-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to reduce long waits on bibtex file parsing #279
Comments
Are you sure you're using bibtex-actions there? That sounds like the sort of thing you might see with the oc-basic org insert processor, but not this package, which is now just using (parsebib-parse '("/path/refs.bib")) |
I just parsed this 25MB file: https://github.com/fabrice102/bibboost/blob/master/test/crypto.bib Seems to have about 50k entries. This took awhile; 21 seconds to be precise. But it's a lot bigger than 2k. My recollection is a 2k file on my laptop takes maybe a second, but probably less; certainly nothing close to 30. Aside: with now using parsebib 3.0, bibtex-actions also supports CSL JSON. My guess is it will parse faster, but I haven't tested it. Note to self: this package might be useful? https://github.com/jwiegley/emacs-async |
Also, see #278 (comment) |
Same problem for me, but just parsing with parsebib-parse seems quick. Is it because formatting is applied to every entry in some way? I've tested with both biblatex and json exports of my full library from zotero. This runs quickly (3 seconds) and returns a hash-table with 8000 entries (my library) This is slower (10 seconds) but seem to return a similar hash-table: A profiler sample when parsing json (trying to insert a citation which starts off parsing from bibtex-actions). This was canceled after about 20 seconds, since it never seems to be finished:
Similar for bib-file. Canceled after 30 seconds:
|
BTW, this is on main: 75a7ffa |
Thanks. I'm working on changes (started as a bug fix, but is broader now) on this branch that might address this. |
Just to clarify, @andersjohansson, you see the same even without org-cite? E.g. if you do I haven't fully tested #281, but if you have time to test that and let me know, that'd be great. |
Oh, that seemed to work fine (loading in about 8 seconds) but now I can’t reproduce it so easily either. Launching emacs and creating an org-buffer (without a file) and then doing I'll try out #281, I saw that you were doing something there after my first comment earlier, but was unsure of if it might solve this 😄 |
For my first test, it seems to work without getting stuck, but see #284. |
So, it turned out that my configuration code was not getting loaded for silly reasons related to a bad regexp in my init file. Yes, in my case oc-basic was responsible for the extremely long waits. It seems way more responsive now, though I haven't done any formal testing & it sounds like @andersjohansson is on the track of something more substantive. I'll refrain from closing, as the conversation is of more value than my report... |
I merged #281 given the serious bug, but it could use some more testing. |
Describe the bug
It takes quite a long time for bibtex files to be parsed when updated. I notice this as a Zotero user whose bibtex files are auto-exported when new sources get added. The parsing takes on the order of 30 seconds on a Thinkpad T490 running Arch Linux, on a main bibliography of about 2100 references (so, large, but not immense).
This period of time is long enough that I often forget what references I intend to insert :-)
I'm wondering if there are efficiencies somewhere that can improve parsing time.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I suppose the right label here would actually be "desired behaviour" and hte answer would be "something that allows work to proceed while parsing is happening in the background, or else, cleverly reduces the number of parsing operations so that the whole cache doesn't have to be rebuilt from scratch.
Really, a proper database is what's asked for here, I guess, and that is difficult.
Emacs version:
28.0.50, org-mode and bibtex-actions both from git, though also both a week or two out of date.
The text was updated successfully, but these errors were encountered: