D15134: decrease StateData space by more than 50% and half the number of needed mallocs

Christoph Cullmann noreply at phabricator.kde.org
Wed Aug 29 09:01:15 BST 2018


cullmann updated this revision to Diff 40621.
cullmann added a comment.


  Proposed solution that is "safe": We use a weak reference to check for state validity.
  This is bit more expensive than the raw-pointer but even save if e.g. by accident a new definition gets allocated to the same address as an old one.
  I added shortcut to check for pointer equality for shared states.

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15134?vs=40587&id=40621

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

AFFECTED FILES
  src/lib/abstracthighlighter.cpp
  src/lib/definition.cpp
  src/lib/definitionref_p.h
  src/lib/state.cpp
  src/lib/state_p.h

To: cullmann, vkrause, dhaumann
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180829/d802ec75/attachment.html>


More information about the KWrite-Devel mailing list