Bug 449343 - memory allocation increments by searches, finally Kate freezes
Summary: memory allocation increments by searches, finally Kate freezes
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: 19.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-29 22:20 UTC by ok@volxweb.com
Modified: 2022-01-30 05:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ok@volxweb.com 2022-01-29 22:20:51 UTC
SUMMARY
-------------------------
Environment: UBUNTU 20.04  Kate 19.12.3 - both installed Jan.2022
Memory allocation: Kate without session files: ~50 MiB
- with my session: ~470 MiB  (~90 files, mainly .txt and PERL source code, roughly 200 MB total file size)
During repeated searches, like 30 or so, in differing big text files, memory allocation each time incremented. 
When ~670 MiB are reached, Kate freezes. 

OBSERVED RESULT
---------------------------
With each search the RAM allocation increases, e.g. plus 12 MiB after a search in an 8 MiB file .txt
This only happens when editing files, and when switching between files, before a search. 
Searches become slower.  When reaching ~670 MiB, a simple word serach in an 8 BM file .txt, searches take minutes or never end. 
When I start Kate again from the terminal window, all is o.k.. It starts again with 470 MB. This takes only seconds.  So the problem is not vital. 


STEPS TO REPRODUCE
-----------------------------
I suppose that it can only be reproduced when files of several MB per file are used actively for searches and editing, and when there is a significant total file MB volume. 

EXPECTED RESULT
If searches require RAM for execution, or files are edited and increase size, then memory should be released afterwords, or there should be garbage collection in the background. 
There is enough RAM on this computer, a multiple of the total used memory displayed by the systems monitor. There is a LINUX swap partition. System and SWAP are on SSD. All user files (edited by Kate) are on traditional hard disks. 

SOFTWARE/OS VERSION 
-------------------------
Linux Ubuntu /Kate was downloaded and installed 
- impossible to create a permanent icon in the side bar
- I create it in the startup menu (via terminal window/ bash) and have it this way in the side bar.  
KATE Version: apt-get told me: 19.12.3 is the newest KATE version for my installed LINUX 20.04, installed in 2022-01. 


ADDITIONAL INFORMATION - past Kate versions did not have such problems 
---------------------------------------------------------------------------
I never had a problem like this in the past. I am using Kate and predecessor since ?_10++_? years. Searches are in general now much slower, might be 2 to 5 seconds in big files like 8 MB. 
In LINUX 16.04 with Kate of that time, it was instantly, no delay to state. Same PC - with average speed, not extremely fast, not extremely slow. 
This in part due to the feature of incremental search. There is a work-around for this - hence it is not a major problem. - I did not find a direct setting how to disable incremental search to OFF when typing in a search expression into the search field. In big files like 8 MB, incremental search is annoying due to pauses of might be 1 to 3 seconds after each typed character. 
In addition, the expression "search wrapped" is not optimal, wrapped can have different meanings. 
For LINUX 20.04 , I imported the session file of KATE used during LINUX 16.04. This worked fine for the 90 files (some settings had do be adapted).
Comment 1 Waqar Ahmed 2022-01-30 05:54:16 UTC
Please try a recent version of Kate (21.12) The problems you mention have been fixed and performance of search as well as performance in general has been significantly improved.