Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some ModelIO instance fields constants #2050

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

Azquelt
Copy link
Contributor

@Azquelt Azquelt commented Oct 30, 2024

The initialization of these two fields showed up in performance testing, since we create quite a few ModelIO-based objects when parsing or serializing and SmallRyeOASModels populates a large map in its constructor.

An alternative would be to make SmallRyeOASModels a singleton, but since this is the only place it's used, making the field a constant should fix the performance issue.

The initialisation of these two fields showed up in performance testing,
since we create quite a few ModelIO-based objects when parsing or
serializing and SmallRyeOASModels populates a large map in its
constructor.
Copy link

sonarcloud bot commented Oct 30, 2024

@MikeEdgar MikeEdgar added this to the 4.0.1 milestone Oct 30, 2024
Copy link
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Azquelt . I'll probably release 4.0.1 later today or tomorrow once I have the other fixes verified.

@MikeEdgar MikeEdgar merged commit 61225d8 into smallrye:main Oct 30, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants