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.
- Open a document on a mounted network share, e.g. a text document on a CIFS share with Libreoffice Writer or Kate.
- Open the application menu (kicker), look at Recent Documents, the document's filename should be there.
- 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.
Reviewed By: dfaure
Subscribers: apol, ngraham, plasma-devel
Differential Revision: https://phabricator.kde.org/D19784