-
Notifications
You must be signed in to change notification settings - Fork 93
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
Indexing takes over 100x longer on big file #322
Comments
OK, that is weird. The only change in 3.1.1 that could realistically cause this is #308. Could it be that you have a lot of recursive type parameters ( |
Signed-off-by: Patrick Reinhart <patrick@reini.net>
In our test case reverting the |
Actually #308 has caused this issue. In our case we need to revert the version delivered in WildFly 29 back to 3.1.0 due to fact, that the deployment will take 15 instead of around 1 minute. I wonder, that no benchmark test seem to have caught this problem unfortunately... |
This seems to be a reasonable approach: https://github.com/Ladicek/jandex/commits/type-variable-reference-intern-hash-collisions Could you please build Jandex from that branch and test with it? Thank you! |
Note that the branch actually changes the persistent index format, so it will require releasing Jandex 3.2. Also older versions of Jandex won't be able to read an index produced by Jandex built from that branch, so take care. |
@Ladicek I will run a check tomorrow and give you feedback |
@Ladicek The proposed fix seems to have more ore less the same performance as the version 3.1.0 taking slightly longer: |
Yeah, it does take a little more time -- the JAR from your repo requires cca 8 seconds to index with Jandex 3.1.0 on my machine, and roughly 10 seconds with the suggested patch. I would think that's acceptable, but I can try to reduce it further. I was more interested in actual usage. If you replace Jandex in WildFly with the version from my branch, does that keep working for you? (I don't see why it shouldn't, all the existing Jandex tests pass, but real world feedback is always best.) |
Hi @Ladicek I did some measurements for comparison as follows: Jandex 3.1.0 without index file in jar (17s)
Jandex 3.1.2 without index file in jar (12min 17s)
Jandex 3.1.3-SNAPSHOT with index file in (22s)
Jandex 3.1.3-SNAPSHOT without index file in jar (20s)
|
OK, thanks. I was more interested in hearing about any possible issues when running the application, but I realized that there's most likely nothing in WildFly bothering about type variable references, so we should be good there. The 3rd experiment is interesting, Jandex 3.1.3-SNAPSHOT should very much be able to read an index generated by 3.0.5. There must be a bug somewhere, likely similar to #320, which I need to investigate. In any case, as I mentioned, this will need Jandex 3.2, because of the change of persistent index format. |
OK, I fixed the case when Jandex 3.1.3-SNAPSHOT couldn't read an index generated by 3.0.5, that was some poor handling of versioning on my side. Thanks for highlighting that. |
@Ladicek thanks for your fast feedback. For providing an index within our big libraries can mitigate the issue and we would patch our WildFly instance if needed. I guess that as long as we keep generating the index using a Jandex version that aligns the one for WildFly we should be save. Having a fix in the future will be perfectly ok for us. |
If indexing takes longer time, pregenerating the index (using the Maven plugin for example) is a good choice indeed. |
@Ladicek does this mean, that you create a version 3.2.0 now? |
There's one more PR that needs some more work (#361), so it will take a bit more time, but 3.2.0 is near indeed. |
When indexing a big file that contains around 16000 generated classes, the indexing process takes around 100 more time.
Jandex 3.1.0 ~ 5 seconds
Jandex 3.1.1 ~ 490 seconds
The text was updated successfully, but these errors were encountered: