Summary: | Krita 'Spray Pen' / 'Chalk' use excessive memory & become very slow | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | J Appel <scl+kde> |
Component: | Brush engines | Assignee: | LukasT <lukast.dev> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | halla, lemma, pentalis, user581 |
Priority: | NOR | Keywords: | release_blocker |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
J Appel
2010-07-16 23:44:59 UTC
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 |