D10621: Highlighting Indexer: list of suggestions

2019-01-09 Thread jonathan poelen
jpoelen added a comment. I agree that some rules are excessive or even false, but the last time I watched (it was several months ago now), some regexes suggested to be DetectString seemed to have writing errors (mainly `\\` count as 2 characters in xml) and some more or less useful propositi

D10621: Highlighting Indexer: list of suggestions

2019-01-08 Thread Dominik Haumann
dhaumann added a comment. Herald added a project: Kate. Herald edited subscribers, added: kde-frameworks-devel, kwrite-devel; removed: Frameworks. What do we do with this? I think some of the checks are a bit too aggressive, such as folding multiple regexps into a single one: This makes

D10621: Highlighting Indexer: list of suggestions

2018-03-24 Thread jonathan poelen
jpoelen updated this revision to Diff 30448. jpoelen added a comment. New suggestions: - Regex "^xyz\b" -> WordDetect with column=0 - Regex "^xyz" with xyz a string of more than 2 characters -> StringDetext with column=0 Output: - Double quote are no longer escaped - "^\\s*"

D10621: Highlighting Indexer: list of suggestions

2018-03-18 Thread jonathan poelen
jpoelen updated this revision to Diff 29869. jpoelen added a comment. More suggestions and fixes some false positives. REPOSITORY R216 Syntax Highlighting CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10621?vs=27439&id=29869 BRANCH suggest REVISION DETAIL https://phabricato

D10621: Highlighting Indexer: list of suggestions

2018-03-17 Thread jonathan poelen
jpoelen added a comment. I just tried with a format containing 5000 `` rules. This gives 2000 to 6000 more allocation than with WordDetect. Same for StringDetect vs Detect2Chars. At the speed level, for a single rule and a file with 13 * 8000 `aa `, WordDetect is 10% faster, but there is

D10621: Highlighting Indexer: list of suggestions

2018-03-13 Thread Dominik Haumann
dhaumann added a comment. @jpoelen What would be interesting is to check which optimizations are really an improvement. Because we should either get a significant speed boost (e.g. RegExpr -> WordDetect), or at least reduce memory allocations (possibly StringDetect -> Detect2Chars and Detect

D10621: Highlighting Indexer: list of suggestions

2018-03-12 Thread jonathan poelen
jpoelen added a comment. I've already planned to fix all the suggestions, but I lost a lot of time updating the `sql*.xml` files and came across a very strange bug related to QRegularExpression by adding some tests. At the moment, I do not know if it's my tool to test, my version of Qt that

D10621: Highlighting Indexer: list of suggestions

2018-03-11 Thread Volker Krause
vkrause added a comment. Very nice idea! RegExp rules are the by far biggest cost factor, so every single one we can get rid of is good :) REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D10621 To: jpoelen, dhaumann Cc: vkrause, #framework_syntax_highligh

D10621: Highlighting Indexer: list of suggestions

2018-03-10 Thread Dominik Haumann
dhaumann added a comment. Just for info: https://kate-editor.org/2018/03/10/improving-syntax-highlighting-files/ tries to reach a broader audience for getting patches. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D10621 To: jpoelen, dhaumann Cc: #fram

D10621: Highlighting Indexer: list of suggestions

2018-03-10 Thread Dominik Haumann
dhaumann requested changes to this revision. dhaumann added a comment. This revision now requires changes to proceed. Btw, current generated list finds 1658 issues: https://paste.kde.org/p7iareuxc Not all of them are correct, for instance zsh.xml" line 919 RegExpr candidate for "De

D10621: Highlighting Indexer: list of suggestions

2018-03-10 Thread Dominik Haumann
dhaumann added a comment. As quick comment: I like the idea of programmatically suggesting better usage of rules. I did not yet fine the time to look into this, so I do not know how much output this currently generates. In any case, for the highlighting files we ship with the syntax high

D10621: Highlighting Indexer: list of suggestions

2018-02-17 Thread jonathan poelen
jpoelen added a project: Framework: Syntax Highlighting. jpoelen added a subscriber: Framework: Syntax Highlighting. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D10621 To: jpoelen, dhaumann Cc: #framework_syntax_highlighting, dhaumann, #frameworks, michael

D10621: Highlighting Indexer: list of suggestions

2018-02-17 Thread jonathan poelen
jpoelen created this revision. jpoelen added a reviewer: dhaumann. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. jpoelen requested review of this revision. REVISION SUMMARY Proposes mergers of rules and the replacement of: - RegEx