C++: Fix/tune semantic highlighter result chunk size.

The fix: when finished with a FunctionDefinition, only flush when the
number of usages reaches the chunk size. This should prevent a lot of
chunks with a low number of usages for files with short methods.

The tuning: for files larger than 10000 lines, use a larger chunk size
to prevent the UI thread from having to re-layout/re-paint too often.

Change-Id: I419174d306b8380c6fa8402825767e26c73f62ec
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2013-02-26 11:11:43 +01:00
committed by Erik Verbruggen
parent 4d7e1c43db
commit 2d3d53a011
2 changed files with 13 additions and 5 deletions

View File

@@ -175,6 +175,7 @@ private:
QSet<QByteArray> _potentialStatics;
QList<AST *> _astStack;
QVector<Use> _usages;
int _chunkSize;
unsigned _lineOfLastUsage;
QList<Use> _macroUses;
};