• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Kate keeps writing to disk as I type - makes it slow

Red Squirrel

No Lifer
I've had this issue before where typing in Kate is very choppy if editing a file over NFS (practically all my files because they are centrally located on a NFS server). There's an option under configire, open/save, advanced called "disable swap files syncing" that had fixed this issue in my past distro (Xubuntu) but for some reason in my curent distro (Kubuntu) it does not solve it. If I hold down a key, it will lag then do like 20 at once. If I do a TCP dump there is some massive amount of data being written for each key stroke. I don't know why it would even cause an issue as I have a gigabit network, but guess there is still a small amount of latency compared to a local disk.

Is there a way to disable whatever it is doing when it writes to disk all the time? I have lot of ram on this system, I would rather it just load the entire file into ram and work on it from there and moving files to local disk only to edit them is not a solution.

I'm even open to alternate editors, though I kind of like kate and it does everything I want it to, except for that part.

Not finding much on Google either, which is odd as I would think this would be a very common issue. I can't be the only one that stores code in a central location and edits it remotely over NFS.
 
I'm not sure why every key press is saved in the first place. Seems pretty stupid, compared to an async write every 10-30 seconds. I wonder if something else is at play?

Not finding much on Google either, which is odd as I would think this would be a very common issue.
It could very well be a common problem, for a small number of users actually trying that. I can't imagine there are all that many, though. Most that use NFS tend to be transferring files, not editing over them, and the popularity of NFS is not exactly growing. TBH, I haven't known anyone that used NFS out of preference for over 10 years, now. As soon as Samba could talk on a NT4 domain...

Make sure you're not mounting it sync, through.
 
Hmm when I mount I'm just using "defaults". Should I be putting something else in there? If I can't fix it at the Kate end perhaps I can fix it by handling NFS a bit differently at the client, such as some kind of buffering. Is there anything like that I can do?

As for Samba I used to actually use it and it works fine, but figured since I'm in a full Linux environment NFS is the way to go. Is SMB still preferred even if I don't have Windows?
 
I'm not sure why every key press is saved in the first place. Seems pretty stupid, compared to an async write every 10-30 seconds. I wonder if something else is at play?

It could very well be a common problem, for a small number of users actually trying that. I can't imagine there are all that many, though. Most that use NFS tend to be transferring files, not editing over them, and the popularity of NFS is not exactly growing. TBH, I haven't known anyone that used NFS out of preference for over 10 years, now. As soon as Samba could talk on a NT4 domain...

Make sure you're not mounting it sync, through.

I would imagine it has some sort of swp/tmp file that it uses for auto-recovery purposes.

I know at least with VIM you can tell it where to store those files, the default is in the same directory as the file you are editing. I've got mine set to a .tmp folder in my home directory.
 
Yeah locally it's fine, because I have a SSD, over NFS/SMB etc there is probably just enough latency to cause a noticable delay, given it is writing for every key stroke and generating tons of small packets. If it would buffer and only write like once a second or something it probably would not be as bad.
 
Sure... when the file is local..
Or if it's not. If Kate is forcing flushing at every key stroke, you'd notice it on a HDD, USB stick, Zentyal file server (domain controller w/ Samba shares), or ClearOS file server (domain controller w/ Samba shares), too, no? I don't know if it's a NFS problem, specifically, or not, but I rather like Kate, and haven't had any such problems, over the years, going to Linux box Samba shares.
 
Last edited:
What version do you have? I did not have this issue either till I switched to Kubuntu and running version 3.10.5. Previously I had the issue but the checkbox to disable the swap file syncing fixed the issue.

Locally it's fine, I can hold down a key and it's smooth.

Over NFS, if I hold down a key or even type too fast it lags a lot. I wonder if this is a bug.
 
How would I do that? Is that an app?

I'm almost positive it's simply writting to the swap file though, but it does it for each character, and since it's waiting till it's done writing to return control back to the app (single threaded I imagine) it causes a delay.
 
Back
Top