Skip to content

Improve cstyle performance

Waqar Ahmed requested to merge work/cstyle-fast into master

With this patch I can notice 7x-8x improvement in performance. The main culprit was tryMultiLineStringLiteral which searched the whole document for a multiline literal beginning. I have now limited it to 25 lines max.

Besides, the multiline string matching is useless for every other language besides C++ so return early if the mode is no C++

CCBUG: 465841 CCBUG: 466531

Merge request reports