-
-
Notifications
You must be signed in to change notification settings - Fork 958
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
Performing the has:plural
lookup is quite slow
#8719
Comments
has:plural
lookup is quite slowhas:plural
lookup is quite slow
Confirmed on my test instance as well. Most likely this was caused by 50c5258 - the pg_trgm is great for text search, but performs poorly on whitespace search (what Related: https://stackoverflow.com/questions/57683799/postgresql-using-pg-trgm-slower-then-full-scan |
Thank you for your report; the issue you have reported has just been fixed.
|
@nijel Performing a |
Probably yes, though this one should not be that bad... |
My primary use case is searching at the language of a project level. It still takes me several minutes to load the results listing page. I think this is unacceptable. |
Yes, the string length is the key here (or actually the length of the alphanumeric part of the string). Unfortunately, getting that info from regular expression is not that straightforward, but I will look into options… Weblate uses PostgreSQL trigram index to optimize these. They work great for 3+ alphanumeric chars, but horribly for shorter ones. Unfortunately, the PostgreSQL optimizer doesn't deal with this, and we work around this in Weblate for the strings by adding string concatenation to the field when the string is too short and would perform badly. Adding operation on the field stops PostgreSQL from using index, and resorts to full table scan, which is faster in this case. |
This should improve performance of the short regex expression lookups. Fixes WeblateOrg#8719
#8840 should address this. |
This should improve performance of the short regex expression lookups. Fixes #8719
Describe the issue
It takes quite a long time to perform the
has:plural
lookup at the language of a project level.I cannot even load the page while performing the
has:plural
lookup at the project level and the language of an instance level.I already tried
Steps to reproduce the behavior
has:plural
Search
buttonExpected behavior
Everyone can open the corresponding page.
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
weblate.org service
Weblate versions
Weblate 4.16-dev (weblate-4.15.2-209-gde41682274)
Weblate deploy checks
No response
Additional context
Example:
The text was updated successfully, but these errors were encountered: