Bug 348159 - Kate unresponsive when typing in text (swp file saved after every character, locks up for ~1second)
Summary: Kate unresponsive when typing in text (swp file saved after every character, ...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 349893 354080 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-23 18:58 UTC by Reinhold Kainhofer
Modified: 2015-10-19 09:41 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: KTextEditor 5.12 and Kate 15.08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhold Kainhofer 2015-05-23 18:58:23 UTC
Entering Text in Kate (or kwrite) in KDE5  -- as opposed to KDE4 -- is very sluggish and unresponsive. The typed text sometimes takes a second to appear.

Running kate through strace shows that whenever kate tries to save the .kate-swp file, it is basically locked up for ~1 second. Since apparently kate saves the swap file nearly after every character, this means that kate is constantly locking up for a few moments before the next typed text appears.

Unfortunately, the entered characters are not even in the correct order. In particular, if I enter:
    if ($ctrsettings["${type}_global"] == 'yes')
then kate actually inserts
    if ($ctrs"ettings[${type}_g"lobal] == ''yes)

In particular, it appears as if all quotes are inserted immediately, while all letters are inserted afterwards, even if they are typed before the quotes.

Reproducible: Always

Steps to Reproduce:
1. Enter some text in kate
2. The first few characters will appear immediately, but the next will appear only after a second
Comment 1 Błażej Szczygieł 2015-06-03 15:38:00 UTC
I can confirm that Kate and KWrite in KF5 syncs data to swap on every character instead of specified time in settings. Every character written in text editor (when file is opened) is synchronized to HDD (not to buffer), so HDD must write every change! This is very slow and shortens HDD/SSD life!

As a workaround, you can disable swap sync in settings.
Comment 2 Christoph Cullmann 2015-06-08 18:41:09 UTC
Git commit 034f0a9babf28b5d4719a9695066e855186e6cf0 by Christoph Cullmann.
Committed on 08/06/2015 at 18:40.
Pushed by cullmann into branch 'master'.

fix problem with lockups, wrong time unit ms vs. s for swrap file saving

M  +2    -1    src/swapfile/kateswapfile.cpp

http://commits.kde.org/ktexteditor/034f0a9babf28b5d4719a9695066e855186e6cf0
Comment 3 Christoph Cullmann 2015-07-11 14:03:41 UTC
*** Bug 349893 has been marked as a duplicate of this bug. ***
Comment 4 Kåre Särs 2015-10-19 09:41:47 UTC
*** Bug 354080 has been marked as a duplicate of this bug. ***