Skip to content
  • Allison Karlitskaya's avatar
    gdesktopappinfo: keep a list of files in the dirs · 86ce3bf4
    Allison Karlitskaya authored
    In each DesktopFileDir, store a list of desktop files for that
    directory.  This speeds up opening desktop files by name because we can
    skip statting in directories that we know don't have the file and also
    speeds up _get_all() because we can avoid enumeration.
    
    This also improves our support for dealing with names like
    'kde4/kate.desktop' (equivalent to kde4-kate.desktop) since we find out
    about all of these files are the start and don't need to guess about
    which '-' to change to a '/'.  It also means that we can easily deal
    with more than one level of such prefixes.
    
    We use a file monitor to watch for changes, invalidating our lists when
    we notice them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711520
    86ce3bf4