-
Notifications
You must be signed in to change notification settings - Fork 162
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
Performance problem with release 3.1.16 and 3.2.5 #738
Comments
Thanks for your detailed report. We're gonna investigate this. Related to the fix for #678. I understand the problem and I like the idea of your fix and I think I'm gonna use most of it. Would you be able to test a feature branch in your system? We can fix this in a patch release. |
GH-678 and the changes related to GH-391 introduced a performance issue with regards of looking up fully qualified class names. This change addresse it by: * Not using the stream api (again) * Caching the result of the lookup As the later should happens thread safe, we use a `ConcurrentHashMap`, so we cannot store null values, but optional references.
GH-678 and the changes related to GH-391 introduced a performance issue with regards of looking up fully qualified class names. This change addresse it by: * Not using the stream api (again) * Caching the result of the lookup As the later should happens thread safe, we use a `ConcurrentHashMap`, so we cannot store null values, but optional references.
Hey @torstenkuhnhenne could you please have a look if either #740 (Patch for 3.1) or #739 (Patch for Master / 3.2) solves this for you? |
Hi @michael-simons I have tested both patches and can confirm that they solve the problem! :-) Thank you for the quick response and the good work :-) |
🙇 thank you. Expect a patch next week. I’ll see if I can address the other new issue on Monday. |
GH-678 and the changes related to GH-391 introduced a performance issue with regards of looking up fully qualified class names. This change addresse it by: * Not using the stream api (again) * Caching the result of the lookup As the later should happens thread safe, we use a `ConcurrentHashMap`, so we cannot store null values, but optional references.
GH-678 and the changes related to GH-391 introduced a performance issue with regards of looking up fully qualified class names. This change addresse it by: * Not using the stream api (again) * Caching the result of the lookup As the later should happens thread safe, we use a `ConcurrentHashMap`, so we cannot store null values, but optional references.
GH-678 and the changes related to GH-391 introduced a performance issue with regards of looking up fully qualified class names. This change addresse it by: * Not using the stream api (again) * Caching the result of the lookup As the later should happens thread safe, we use a `ConcurrentHashMap`, so we cannot store null values, but optional references.
After upgrading from 3.1.15 to release 3.1.16 I have massive performance problems.
I did some profiling and most of the time is spent in DomainInfo.getClassInfo():
![image](https://user-images.githubusercontent.com/19815499/72152979-e655de00-33ac-11ea-9421-4636610693d3.png)
I also debugged into the code and the problem seems to occur for queries that do not return a domain object but a simple type, e.g. int or String.
For these types the
Map
provided toDomainInfo.getClassInfo()
contains no entry and so the "slow path" via regex and stream is used to find out that there is no mapping available. And then the scalar mapping is applied inExecuteQueriesDelegate.executeAndMap(Class<T>, String, Map<String, ?>)
I also tried the release 3.2.5 and this has also the performance problem.
I added an additional cache to the method, so that the result of "slow path" is cached and that resolved the performance problem for me, see torstenkuhnhenne@f55372f
Expected Behavior
The new releases 3.1.16 and 3.2.5 should be as fast as 3.1.15.
Current Behavior
The releases 3.1.16 and 3.2.5 are much slower than 3.1.15.
Possible Solution
Downgrade to 3.1.15
Your Environment
The text was updated successfully, but these errors were encountered: