• Spencer Baugh's avatar
    Use 'regexp-opt' in 'dired-omit-regexp' · abc2d39e
    Spencer Baugh authored
    In my benchmarking, for large dired buffers, using 'regexp-opt'
    provides around a 3x speedup in omitting.
    
    'regexp-opt' takes around 5 milliseconds, so to avoid slowing
    down omitting in small dired buffers we cache the return value.
    
    Since omitting is now 3x faster, increase 'dired-omit-size-limit'
    by 3x.  Also, document 'dired-omit-size-limit' better.
    
    * doc/misc/dired-x.texi (Omitting Variables): Document
    'dired-omit-size-limit'.
    * etc/NEWS: Announce increase of 'dired-omit-size-limit'.
    * lisp/dired-x.el (dired-omit--extension-regexp-cache): Add.
    (dired-omit-regexp): Use 'regexp-opt'.  (Bug#69775)
    (dired-omit-size-limit): Increase and improve docs.
    abc2d39e