Skip to content

Conversation

@MikeEdgar
Copy link
Member

For #2401

phillip-kruger
phillip-kruger previously approved these changes Nov 6, 2025
@gsmet
Copy link
Contributor

gsmet commented Nov 6, 2025

@MikeEdgar so only changing streams to for loops makes such a huge difference?

@MikeEdgar
Copy link
Member Author

@MikeEdgar so only changing streams to for loops makes such a huge difference?

@gsmet also the change in AugmentedIndexView is quite significant. Instead of asking the Jandex class for all methods and filtering the stream, it now asks for the method by name + parameter types. Most of the other changes to switch from streams to loops help with reducing the call depth and also make debugging/stepping through the scanner easier.

I think there is very likely to be some more room to improve how we use Jandex and possibly propose some features there to help out further.

@gsmet
Copy link
Contributor

gsmet commented Nov 12, 2025

@MikeEdgar FYI I will push the new Jandex to next 3.29.z and 3.30.0.

@MikeEdgar MikeEdgar linked an issue Nov 12, 2025 that may be closed by this pull request
@sonarqubecloud
Copy link

@MikeEdgar MikeEdgar marked this pull request as ready for review November 12, 2025 17:36
@MikeEdgar
Copy link
Member Author

I think this should be ready to go now. It can be seen in the flame grapns how significant the reduction in parameter processing is with these changes. Thank you @Postremus for bringing up the issue.

Release 4.2.1: flamegraph-cpu-sropenapi-4.2.1.html (filtered to io.smallrye.openapi)
image

Changes in this PR: flamegraph-cpu-sropenapi-pr2404.html (filtered to io.smallrye.openapi)
image

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.

Openapi generation somewhat slow

3 participants