Skip to content

Severe performance regression in JavaPackage #1100

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

Closed
odrotbohm opened this issue Mar 4, 2025 · 0 comments
Closed

Severe performance regression in JavaPackage #1100

odrotbohm opened this issue Mar 4, 2025 · 0 comments
Assignees
Labels
in: core Core module meta model type: bug Something isn't working
Milestone

Comments

@odrotbohm
Copy link
Member

Back-port of GH-1098.

@odrotbohm odrotbohm added in: core Core module meta model type: bug Something isn't working labels Mar 4, 2025
@odrotbohm odrotbohm added this to the 1.3.4 milestone Mar 4, 2025
@odrotbohm odrotbohm self-assigned this Mar 4, 2025
odrotbohm added a commit that referenced this issue Mar 4, 2025
The fix for GH-1041 introduced a performance regression as the calculation of the sub-packages escaped the SingletonSupplier and thus is now included in every hashCode() calculation. Took the chance to significantly revamp the sub-package calculation for nested packages. In other words, the entire sub-package arrangement for a package is calculated once with pre-computed intermediaries held instead of re-computing them per sub-package.
odrotbohm added a commit that referenced this issue Mar 7, 2025
We now resort to a simple iteration over the types within a Classes arrangement to detect all classes residing in certain packages. This is primarily used during the JavaPackage data structure construction as it's called for every sub-package of a package originally created from a Classes instance. The new simplified algorithm avoids set up of DescribedPredicate instances to eventually only perform simple package name checks.
odrotbohm added a commit that referenced this issue Mar 7, 2025
We now resort to a simple iteration over the types within a Classes arrangement to detect all classes residing in certain packages. This is primarily used during the JavaPackage data structure construction as it's called for every sub-package of a package originally created from a Classes instance. The new simplified algorithm avoids set up of DescribedPredicate instances to eventually only perform simple package name checks.
odrotbohm added a commit that referenced this issue Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Core module meta model type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant