Avoid calling QT_LSTAT and accessing recent documents

Authored by hoffmannrobert on Mar 31 2019, 5:39 PM.


Avoid calling QT_LSTAT and accessing recent documents

Document entries pointing to unavailable network shares freeze
the application menu, so avoid calling QT_LSTAT (lstat64())
three times for each list item and reading the first 16k of
each document when showing the recent documents list in application

The current behaviour of accessing each document in the list
just by browsing the application menu is inacceptable in large
enterprise environments where thousands of users work
with documents located on mounted network shares. This induces
additional load on filers and network, slows down working
with the menu and makes its functioning dependent on network
and remote filesystems.

Test Plan:

  1. Open a document on a mounted network share, e.g. a text document on a CIFS share with Libreoffice Writer or Kate.
  2. Open the application menu (kicker), look at Recent Documents, the document's filename should be there.
  3. Pull out the network plug, open the application menu, try to open Recent Documents. Without this patch, the application menu doesn't work anymore and just hangs. With this patch applied, the menu continues working.

Reviewers: Frameworks, dfaure, Dolphin

Reviewed By: dfaure

Subscribers: apol, ngraham, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D19784


dfaureMar 31 2019, 5:40 PM
Differential Revision
D19784: Avoid calling QT_LSTAT and accessing recent documents
R119:4487f0f3e299: SVN_SILENT made messages (.desktop file) - always resolve ours