org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
572 stars 47 forks source link

(fix) orb-notes-cache for orb-find-note-file #157

Closed myshevchuk closed 3 years ago

myshevchuk commented 3 years ago

To greatly speed up things when bibtex-completion builds its cache Fix #156

orb-find-note-file now does not have a visible impact on bibtex-completion-parse-bibliography (master bib file with ~1800 entries):

1 run with the old function: ~15.5 s 1 run with the fixed function: ~2.9 s 1 run without using orb-find-note-file: ~2.9 s 1 run with orb-find-note-file + default functions: ~3.1 s

This simple test was used:

(benchmark-run 5
  (progn
    (setq orb-notes-cache nil
          bibtex-completion-cache nil)
    (bibtex-completion-candidates)))
fix value of bibtex-completion-find-note-functions total time, s GC runs GC time, s
no '(orb-find-note-file) 77.518197 420 44.164464
yes '(orb-find-note-file) 14.664627 62 7.8004900000000035
yes nil 14.822348999999999 62 7.909169999999996
yes '(orb-find-note-file bibtex-completion-find-note-multiple-files bibtex-completion-find-note-one-file) 15.358028 62 8.055791999999997