Skip to content
  • Albert Gräf's avatar
    Help browser: add an index cache to speed up launch times. · 77819826
    Albert Gräf authored
    Features:
    
    - Rebuilds and caches the search index if there is no cache yet, or if
      the cache is outdated (i.e., any cached directory or its parent was
      removed or modified since the cache was last created).
    
    - Keeps track of the modification times of all cached directories of
      help files, as well as their parent directories, in order to determine
      when the cache is outdated. The parents are tracked to catch changes
      where new sibling directories are added. This may produce some false
      positives and still isn't 100% foolproof, but it is as close as we can
      get if we still want to achieve substantial speedups.
    
    - Automatically rebuilds the index (and cache) from scratch, as soon as
      the help browser is relaunched after changes to the browser
      configuration in the gui prefs. So there's no need any more to
      relaunch Purr Data to have these changes take effect.
    
    Both the index cache and the directory timestamps are maintained as
    ordinary text files with a straightforward syntax (basically
    colon-delimited csv) in the user's home directory. The files are located
    in configuration directories (.purr-data on Linux and Mac,
    AppData/Roaming/Purr-Data on Windows). Thus it's easily possible to
    modify these files with external tools (e.g., if we want to upgrade the
    file format in the future.)
    77819826