Bug 378603 - Kate freezes when manipulating large text blocks
Summary: Kate freezes when manipulating large text blocks
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 16.04.1
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-10 04:02 UTC by Marcell Fulop
Modified: 2019-08-25 21:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcell Fulop 2017-04-10 04:02:20 UTC
When large text files are opened in Kate, it stops responding on the following operations:
- Select all - Tools -> Uppercase / Lowercase
- Select 140000 lines - File -> New, Edit -> Paste

The system reports the process to be continuously running and using about 100% CPU and varying amounts of memory but it never completes the operation.

Obviously, I did not wait _forever_ so "never" is not an accurate description but in previous versions of KDE the exact same or very similar operations completed within a manner of seconds whereas in this version I had to kill the process after 10 minutes or so. This happened several times.

Steps to reproduce:
1) Open any text file of size 9 MiB or larger.
2) Select all text.
3) Select the Tools menu and the Lowercase command.

OR

1) Open any text file of size 9 MiB or larger.
2) Select the first 140000 lines.
3) Open a new, empty document.
4) In the new document, paste the clipboard content.

Other notes:
The files I am experiencing this behaviour with (have not tried with other files) do not have long lines. They actually have fixed column width of 32 and several hundreds of thousand lines.

Attached is one file I could reproduce this bug.
Comment 1 Marcell Fulop 2017-04-10 04:06:14 UTC
I could not attache a file due to attachment size restrictions but it should produce the same behaviour with any text file of the specified size.
Comment 2 Marcell Fulop 2017-04-10 04:08:42 UTC
A seemingly similar problem is reported in the old bug which claims to have been fixed in KDE version 4.3

https://bugs.kde.org/show_bug.cgi?id=193271
Comment 3 Marcell Fulop 2017-04-10 04:43:45 UTC
System information:

HP EliteDesk, i7 core 6700, 24 GiB RAM

$ uname -a
Linux marekful-HP 4.8.0-46-generic #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Comment 4 Marcell Fulop 2017-04-10 07:10:02 UTC
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial
Comment 5 Christoph Cullmann 2019-08-25 21:13:45 UTC
I tried that with some ~30MB and 0.5 million lines document.

All fine for me.

CTRL-A is not that fast, as all stuff is copied to selection, but << 5 seconds here.

The lowercase is << 5 seconds, too.

Please retry with some recent version, thanks!