D21788: Make Plasma::Svg::elementRect a bit leaner

Stefan BrĂ¼ns noreply at phabricator.kde.org
Fri Jun 14 14:27:59 BST 2019


bruns added inline comments.

INLINE COMMENTS

> apol wrote in svg.cpp:123
> static isn't necessary, QRegularExpression already has internal regex compilation optimisations we can leverage.
> Does the assert bother you?

Are you sure about this? As far as I can see:

`QRegularExpression::QRegularExpression(QString pattern)` default constructs a `QRegularExpressionPrivate`, which sets `dirty(true)`.

Calling `QRE::globalMatch()` calls `QREPrivate::compilePattern`, which calls `pcre2_compile_16` and `pcre2_jit_compile_16`.

https://code.woboq.org/qt5/qtbase/src/corelib/tools/qregularexpression.cpp.html#_ZN25QRegularExpressionPrivate14compilePatternEv

I don't see any caching here.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D21788

To: apol, #plasma, #frameworks
Cc: bruns, kde-frameworks-devel, LeGast00n, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190614/48aedbf8/attachment.html>


More information about the Kde-frameworks-devel mailing list