Ok, i've done some measurements. And it looks like the new version is much more responsive (according to my tests on my machine) =)<br><br>Here are the graphs: <a href="http://i677.photobucket.com/albums/vv137/dimula73/krita_graph1.png">http://i677.photobucket.com/albums/vv137/dimula73/krita_graph1.png</a><br>
<br>How I tested. I measured the "response time" of the stroke. The response time is a period that lasts since the painting job is put into the queue and the merge process is finished (the new data has been transferred to the ui thread). This time depends on the speed the user paints with. That is why the graphs are attached. The most interesting graph is the first one. It shows the response time (in milliseconds) relative to the mouse speed (pixels per millisecond). You can see that my cpu (2 cores) saturates at the speed about 1.2 px/msec. The response time grows dramatically. From the user point of view the saturation looks like delaying of the painting relative to the mouse cursor. So the most important part of the graph is the leftmost (<1.2px/msec) part, when the user still controls the painting.<br clear="all">
<br>You can see from the graph that the new version has much better response times. I can't tell you the exact explanation. But the most probably, the reason is that the cpu gets saturated with the old version, because the old version has an excessive thread in KisToolFreehand. So that the cost of this thread is much higher than its productivity.<br>
<br><br>Ok, that was theory, but now I need someone to test this tool on different machines to get better statistics. If someone has a bit of time, could you test it?<br><br>How to test:<br>Currently, there are two special branches for measurement:<br>
<br>Old version (based on master):<br>git checkout origin/response-measure-old-kazakov<br><br>New version (based on my branch):<br>git checkout origin/response-measure-new-kazakov<br><br><br>1) First, you need to checkout one of the two branches<br>
2) Build, run Krita<br>3) Select exactly one preset and do not change it's size/parameters during testing<br>4) Perform about 50-70 strokes. <br>5) The data with numbers will be dumped to your terminal, you should copy it and save somewhere<br>
<br>6) Repeat the same for another branch. Make sure that you use the same preset with the same parameters while painting.<br>7) Save the data to a different file. And send both of them to me =)<br><br>8) Switch back to master:<br>
git checkout master<br><br><br><br>-- <br>Dmitry Kazakov<br>