Bug 460868

Summary: Kate slow to open if networked document in "open recent" list not available
Product: [Frameworks and Libraries] frameworks-kconfigwidgets Reporter: zellox <zellox>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: cullmann, egorov, nate, popov895, zellox
Priority: HI    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.100

Description zellox 2022-10-22 21:48:43 UTC
SUMMARY
If you have a networked item (e.g. through NFS share) in your "open recents" list in kate and you open kate while that network share/document is unavailable, Kate will take 20+ seconds to start. I'm using wayland if that's relevant.

STEPS TO REPRODUCE
1. Mount network share
2. Open file from network share (from Dolphin) in kate
3. Close Kate
4. Unmount network share
5. Open Kate

OBSERVED RESULT
Kate takes 15-30 seconds to start. Clearing recent items in kate will produce expected result.

EXPECTED RESULT
Kate should open instantly.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma:  Arch Linux
KDE Plasma Version: 5.26.1 
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Wayland
Comment 1 Christoph Cullmann 2022-10-29 17:48:12 UTC
I think this is due to the stating of files in the KRecentFiles action.
Comment 2 Bug Janitor Service 2022-11-01 15:02:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/167
Comment 3 Bug Janitor Service 2022-11-01 16:57:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/158
Comment 4 Christoph Cullmann 2022-11-02 12:08:51 UTC
Git commit 6e7ce72254c97e10d02e49ef3180c0f231e11592 by Christoph Cullmann.
Committed on 02/11/2022 at 12:04.
Pushed by cullmann into branch 'master'.

avoid stating files during restore of recent files

even for 'local' files this might result in hangs if the
mount point is not responsive

M  +0    -6    src/krecentfilesaction.cpp

https://invent.kde.org/frameworks/kconfigwidgets/commit/6e7ce72254c97e10d02e49ef3180c0f231e11592
Comment 5 Christoph Cullmann 2022-11-02 12:14:42 UTC
Git commit 1cb6b7436c39ef03c5bbeb43f96df2fc0211c1cd by Christoph Cullmann.
Committed on 02/11/2022 at 12:05.
Pushed by cullmann into branch 'master'.

avoid stating files during restore of recent files

even for 'local' files this might result in hangs if the
mount point is not responsive

M  +0    -7    src/krecentfilesmenu.cpp

https://invent.kde.org/frameworks/kwidgetsaddons/commit/1cb6b7436c39ef03c5bbeb43f96df2fc0211c1cd
Comment 6 Christoph Cullmann 2022-11-06 18:53:21 UTC
Git commit bd02b8c5c921595e7764b19fe86a3cd37e9cc1a0 by Christoph Cullmann.
Committed on 06/11/2022 at 18:52.
Pushed by cullmann into branch 'master'.

avoid stall for hanging network shares

follow up of fixes for recent files menus

M  +10   -10   apps/lib/welcomeview/recentitemsmodel.cpp

https://invent.kde.org/utilities/kate/commit/bd02b8c5c921595e7764b19fe86a3cd37e9cc1a0
Comment 7 Christoph Cullmann 2022-11-06 18:53:37 UTC
Git commit 41d8c11bc90cb96e3391a03332a6d39500dfa92b by Christoph Cullmann.
Committed on 06/11/2022 at 18:53.
Pushed by cullmann into branch 'release/22.12'.

avoid stall for hanging network shares

follow up of fixes for recent files menus


(cherry picked from commit bd02b8c5c921595e7764b19fe86a3cd37e9cc1a0)

M  +10   -10   apps/lib/welcomeview/recentitemsmodel.cpp

https://invent.kde.org/utilities/kate/commit/41d8c11bc90cb96e3391a03332a6d39500dfa92b
Comment 8 Boris Egorov 2023-01-28 06:40:02 UTC
Nice fix. Now your recent items will not disappear when the drive (with location of recent item) is not mounted. I've seen this history loss a few times and I wanted to fix it. But it is already done now.
Comment 9 Christoph Cullmann 2023-01-28 13:09:13 UTC
Thanks ;)
Comment 10 popov895 2023-03-20 12:10:41 UTC
Now Kate displays the wrong icon for folders in the recent items list on the welcome screen.