-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Improve string query parsing flow. #3321
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
Conversation
* @since 3.2.3 | ||
* @author Christoph Strobl | ||
*/ | ||
static class CachableQuery { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The caching key is already quite complex. I'd suggest to keep only the isUnsorted
code path and refine the way we render queries with a sort. That is, render everything before and after ORDER BY
in a first pass (e.g. held in a QueryEnhancer
instance). Then, render Sort
with rather simple string concatenation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above is deliberately targeting the 3.2.x line without applying major changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #3326 to follow up on splitting the transformation (targeting main development line)
This commit makes sure to avoid unnecessary parsing of queries when sorting must not be appended. Additionally the parsed result is cached on a per query string with sort expression basis to avoid parsing repeating occurrences of the same expressions eg. while paging through results.
3ab9e29
to
8bb28a3
Compare
This commit makes sure to avoid unnecessary parsing of queries when sorting must not be appended. Additionally the parsed result is cached on a per query string with sort expression basis to avoid parsing repeating occurrences of the same expressions eg. while paging through results. Closes: #3310 Original pull request: #3321
This commit makes sure to avoid unnecessary parsing of queries when sorting must not be appended. Additionally the parsed result is cached on a per query string with sort expression basis to avoid parsing repeating occurrences of the same expressions eg. while paging through results. Closes: #3310 Original pull request: #3321
Resolves: #3310, #3311