https://bugs.kde.org/show_bug.cgi?id=431945
Bug ID: 431945 Summary: Comics Manager memory leak in Krita 4.4.2 Product: krita Version: 4.4.2 Platform: Appimage OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: General Assignee: krita-bugs-n...@kde.org Reporter: papazoglou.anes...@gmail.com Target Milestone: --- SUMMARY Generating the thumbnail for Comics Manager takes a long time and consumes a large amount of memory that is not released. STEPS TO REPRODUCE 1. Create a comic project in Comics Manager. 2. Add pages into it. 3. Open the project again in Krita. OBSERVED RESULT Comics Manager takes a long time to generate the thumbnails and consumes a large amount of memory (proportional to the size and number of pages in the project). EXPECTED RESULT Loading the thumbnails is near instantaneous and consumes imperceptible amount of memory. SOFTWARE/OS VERSIONS Ubuntu: 20.04 Tested both the appimage and flatpak versions. ADDITIONAL INFORMATION When loading an existing comicConfig.json comic (e.g. 56 pages, 4962x7014 pixels), Krita displays a “Loading pages” dialogue for ~10 seconds before it loads the thumbnails. When that is done, Krita uses 7.5GB more RAM than before opening the json file and it doesn’t seem to be released. Opening any of the pages uses additional memory still. Adding a new page also keeps increasing the memory usage. This happens both with the appimage and flatpak for 4.4.2. When using the 4.4.1 appimage, opening comicConfig.json happens instantly and it takes a negligible amount of memory. Also quoting some additional information from Tiar on krita-artists (https://krita-artists.org/t/potential-memory-leak-for-comics-manager-in-krita-4-4-2/17391): I believe it might be because Krita loads those files as KisDocuments (which means it loads it fully) and then it doesn’t release it even though it removes those documents because Krita doesn’t release memory unless it’s needed (technicalities of using TileManager). Suspicious lines: /comics_project_management_tools/comics_project_manager_docker.py:913: /comics_project_management_tools/comics_project_manager_docker.py:720: I think in other places Krita just loaded mergedimage.png, I think it would be better if it used it everywhere for thumbnails unless it’s for actual loading the file when the user clicks on it. -- You are receiving this mail because: You are watching all bug changes.