Skip to content
  • Robert Hoffmann's avatar
    Avoid calling QT_LSTAT and accessing recent documents · 408f03ca
    Robert Hoffmann authored and David Faure's avatar David Faure committed
    Summary:
    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
    menu.
    
    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
    408f03ca