Version: unspecified OS: Linux Krita 2.2.1 KDE 4.4.5 (both are not selectable with bugzilla at the time of writing) Drawing gets sometimes very slow with the Spray Pen, the Hair Pen and the Chalk Pen. For the Chalk and the Hair pen it is reproducable any time with the first attempt to draw anything. Reproducible: Always Steps to Reproduce: 1. Start a new document, cmyk, 2000x800px (though any new document might do) 2. select the chalk pen, try to draw anything 3. the first few dots are drawn, than the systems freezes. i can watch the memory consumption go up from 100.000k to 400.000 - 800.000k while drawing a simple line with the chalk pen. 4. After a while the rest of the stroke is shown.
Looks like it is related to the use of the cmyk colorspace, rgb seems to work fine.
BUGDAY
While CMYK currently doesn't work for me, I can reproduce this bug on almost ALL colorspaces except RGB and Grayscale, at least using the chalk brush. Drawing only a single line makes memory usage go up to > 2 GB.
Confirmed by following J Appel's instructions. 1 core of my cpu maxes out with this, too. TECH SPECS: Krita revision 1166713 Kubuntu 10.04 32bit KDE 4.5 QT 4.7.0 beta 2
The problem is a speed bottleneck in the Chalk paintop. These lines of code: KoColorTransformation* transfo = dev->colorSpace()->createColorTransformation("hsv_adjustment", params); transfo->transform(m_inkColor.data(), m_inkColor.data(), 1); Take nearly no time to execute in RGB and Greyscale (where there's no saturation). While in CYMK the operation is 100-1000 times slower. Developers can easily confirm this by using QTime in the source. Users can easily confirm this by deactivating Ink Depletion --> Saturation decrease and experience the boost in speed. I'm currently considering how to achieve the same effect without the speed cost. A temporary "bugfix" (actually a hint of a workaround for users) is to add a tooltip saying "Warning: slow in colorspaces different from RGB and CYMK".
SVN commit 1175998 by lukast: Fix slow chalk in CMYK o create the transformation only once o clean up old code and old Windows define for drand48 (it is already in some kdewin lib) o fix brush outline CCBUG:244910 M +13 -13 chalk_brush.cpp M +3 -1 chalk_brush.h M +6 -2 kis_chalk_paintop.cpp M +3 -20 kis_chalk_paintop_settings.cpp M +1 -3 kis_chalk_paintop_settings.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1175998
SVN commit 1176021 by lukast: Fix slow spray on CMYK Creating HSV transformation per dab is slow on CMYK colorspace. Cache it and create it only once. CCBUG:244910 M +12 -9 spray_brush.cpp M +2 -0 spray_brush.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1176021
SVN commit 1176041 by lukast: Fix slow Hairy brush on CMYK. o create the color transformation once per dab o clean up the code BUG:244910 M +23 -24 hairy_brush.cpp M +2 -3 hairy_brush.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1176041