Bug 319279

Summary: Krita maxes out memory when too many brushes are added in folder
Product: [Applications] krita Reporter: JayJay <mnkyshield>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description JayJay 2013-05-03 15:33:03 UTC
Krita uses up all physical and swap memory if too many brushes are added in brushes folder.
This happens even when open file dialog is visible and no file is loaded. With less brushes, less ram is used.

Reproducible: Always

Steps to Reproduce:
1. Add many abr files in brushes folder
2. Start Krita
3. The used memory should surge
Actual Results:  
Both swap and physical memory maxes out

Expected Results:  
Krita should be able to deal with a big no. of resources and memory shouldnt max out.

Gimp deals with the same no. of brushes fine. I am not sure if this is even a bug.
Comment 1 Halla Rempt 2013-05-11 11:50:24 UTC
Thanks for the report. We really need to have two-phase loading for brushes and some kind of max number of brushes in memory.
Comment 2 Halla Rempt 2014-06-26 09:24:03 UTC
Git commit ac7b805c7816725baf71300446612b897638582d by Boudewijn Rempt.
Committed on 26/06/2014 at 09:23.
Pushed by rempt into branch 'master'.

Drop the full brush image after loading it to save memory

When we need it for painting, we can reload it.

M  +14   -5    krita/libbrush/kis_brush.cpp
M  +1    -1    krita/libbrush/kis_brush.h
M  +3    -0    krita/libbrush/kis_brush_server.cpp

http://commits.kde.org/calligra/ac7b805c7816725baf71300446612b897638582d