Summary: | When the app crashes, last-used sets of tabs is lost | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Nate Graham <nate> |
Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cullmann |
Priority: | NOR | ||
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/kate/commit/a11139306939baf66d566de60a5a1e11df53db65 | Version Fixed In: | 23.04 |
Description
Nate Graham
2021-05-19 02:01:05 UTC
That would imply that on each file open you will write the session to the home, I am not sure that is really a good idea, given e.g. on NFS homes that will stall. Perhaps one could just start some "sync me" timer there and batch that together in xx second slices, I assume that would be good enough. Yeah, there are definitely trade-offs involved. However I don't know how common the NFS home directory use case is, and perhaps we could optimize it. And I think writing to the config file every time a document is opened is likely to be less costly than writing based on a timer, unless the timer avoided writes when nothing has changed and determined this in a way that didn't involve reading the config file at all. But even then, you'd lose any tabs that were open after the last sync. :P Unfortunately I use NFS homes daily :P e.g. if you open your session and it has 100 files open, you will now write 100 times the full session config back in worst case. If we just delay that with say a 10 seconds timer, it will be one write in most cases. That seems easily optimizable by only writing to the config file when a new file is opened, not when the session itself is loaded, no? And in the case where multiple files are opened by the same action, they could be batched up and result in only one write not n writes. But a 10 second delay timer would probably be okay. A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1115 Git commit 3d520e79e4b52c009b55982ad3816e6e2f913749 by Waqar Ahmed. Committed on 18/02/2023 at 15:02. Pushed by cullmann into branch 'master'. Sessions: Save session on document open and close M +32 -0 apps/lib/session/katesessionmanager.cpp M +5 -0 apps/lib/session/katesessionmanager.h https://invent.kde.org/utilities/kate/commit/3d520e79e4b52c009b55982ad3816e6e2f913749 Git commit a11139306939baf66d566de60a5a1e11df53db65 by Waqar Ahmed. Committed on 26/02/2023 at 10:43. Pushed by waqar into branch 'release/22.12'. Sessions: Save session on document open and close M +32 -0 apps/lib/session/katesessionmanager.cpp M +5 -0 apps/lib/session/katesessionmanager.h https://invent.kde.org/utilities/kate/commit/a11139306939baf66d566de60a5a1e11df53db65 |