Skip to content
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

Expressions: LIKE operator is slow #31594

Closed
wonder-sk opened this issue Sep 6, 2019 · 2 comments
Closed

Expressions: LIKE operator is slow #31594

wonder-sk opened this issue Sep 6, 2019 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers

Comments

@wonder-sk
Copy link
Member

QGIS rendering may get quite slow with the use of expressions using LIKE.

Internally expressions use QRegExp when evaluating LIKE - this class has now a replacement in Qt5 - QRegularExpression. The new class has better API (easier to cache the engine for the regexp) and also a faster engine (based on PCRE library instead of custom one implemented within Qt). It looks like we need to switch to the new class + add caching of the regexp instance where possible (when the right side is a literal string).

Some platforms seem to be more prone to the slowness - e.g. iOS - see MerginMaps/mobile#433

@wonder-sk wonder-sk added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 6, 2019
@PeterPetrik PeterPetrik added the Symbology Related to vector layer symbology or renderers label Sep 6, 2019
@roya0045
Copy link
Contributor

roya0045 commented Feb 9, 2021

Is this on anyone's radar? I can try to cook up something.

@nyalldawson
Copy link
Collaborator

This is fixed now -- everything in core is migrated to QRegularExpression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

4 participants