D11992: Fix bad performance for `addRules` in `DefaultHighlighter` for big containers

Alexander Semke noreply at phabricator.kde.org
Sat Apr 7 08:35:33 UTC 2018


asemke added a comment.


  Can we try to implement this with a boolean paramer m_suppressRuleChangedSignal instead of adding new functions? In addRules() we set m_suppressRuleChangedSignal = true and use in addRule()
  
    if (!m_supressRuleChangedSignal)
         emit rulesChanged();
  
  The code will be more compact and clean with this. Also, this would be similar to the convention we use in LabPlot <https://phabricator.kde.org/project/profile/56/>.
  
  Can you please provide your octave functions which you used to test with?
  
  P.S. : the template for  DefaultHighlighter::addRules() in defaulthighlighter.h looks like an overkill - this function is called only twice in the code and the container is always QStringList. The same is true most probably for other templated add*() funcitons in defaulthighlighter.h. We should simplify this maybe.

REPOSITORY
  R55 Cantor

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

To: sirgienko, #cantor, asemke
Cc: #cantor, #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180407/3e629619/attachment.html>


More information about the kde-edu mailing list