Fwd: OutputModel performance

Milian Wolff mail at milianw.de
Thu Feb 7 17:37:03 UTC 2013


<snip>

> > I can see that I accidentally sent this to Andreas only - sorry about
> > that.
> > 
> > A test like that already exists in outputmodeltest. It benchmarks the
> > different output filtering strategies.
> > 
> > Here is a sample from a test I just ran:
> > QDEBUG : KDevelop::OutputModelTest::benchmarkAddlinesNofilter() average UI
> > lockup in ms:  0.263682
> > QDEBUG : KDevelop::OutputModelTest::benchmarkAddlinesCompilerfilter()
> > average UI lockup in ms:  8.64179
> > QDEBUG : KDevelop::OutputModelTest::benchmarkAddlinesScriptErrorfilter()
> > average UI lockup in ms:  1.36318
> > QDEBUG :
> > KDevelop::OutputModelTest::benchmarkAddlinesStaticAnalysisfilter()
> > average UI lockup in ms:  0.228856
> > 
> > Maybe if we got a sample of the compileoutput that seems to cause trouble,
> > rewrote the test a little to feed each line to the matching code and do
> > timing on matches. If one or more of the lines sticks out timing wise, it
> > should be fairly simple to find the regex that performs badly on the
> > line(s).
> 
> Here's some sample output to play with: http://pastebin.com/FPEcUWP4
> (4400 lines, flushed in ~15 seconds). If this is done inside KDevelop, I get
> a rather sluggish UI with KDevelop keeping 1 core busy at 100%.
> 
> I can do some more profiling next week probably (busy writing exams atm).
> Then I can also have a more detailled look at the regexps used.

What should be done here:

a) Take a look at the RegExp's and try to optimize them (i.e. by making them 
more explicit, i.e. adding ^,$ stuff or similar).

b) create an active worker object that is moved to a thread, then let that do 
the classification. I.e.:

output line (QString) -> active object, run regexps -> (Categorized Data) -> 
OutputModel

c) also ensure the regexps are only compiled once - but I think that is 
already the case, no?

d) wait for Qt5 - the regexp stuff there is much much better

cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130207/be99ac2d/attachment.sig>


More information about the KDevelop-devel mailing list