-
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
More performant rendering/activation of citations #842
Comments
+1 I also suffer from bad performance. When scrolling large buffers with lots of citations, Emacs regularly locks up for seconds when Citar is enabled. |
@andras-simonyi - any thoughts on this? It's related to you your activate processor. |
I'm not sure, I have tested now oc-csl-activate on a 544K Org file with more than 1200 citations and haven't noticed any rendering slowdown during editing with or without using the citar cache as information source. |
I'd like to clarify, your oc-csl-activate does it's job well — I get no slowdowns there. I only referenced it in my original post because although a user can install another package to alleviate performance, I think the default activate function for citar shouldn't be slow to begin with. The function I included in my original post is one that should basically be identical to citar's current functionality but without the slowdown. |
Sorry for my confusion.
The current one IIRC just reuses the default org one. If that's the case,
ideally the fix would be made there?
|
I'll look at this more closely soon. It does seem appropriate for here,
given use of the cache.
A PR would be nice.
|
You do have a point: if (I'll consider officially bringing this up to the org-mode devs, but to be frank, I'm only familiar with contributing and discussing on github, so the task is daunting.)
Sure, I can open a PR on this if you think it's worth pursuing. |
Hope you weren't waiting on me, but just in case, yes, that'd be great. |
Sorry about that. Just made a PR for this. |
Closed vis #845 |
Is your feature request related to a problem? Please describe.
I notice that the rendering/activation of org-mode citations with citar (i.e. when
org-cite-activate-processor
is'citar
) is very slow. When editing a line with one or more citations, Emacs freezes for multiple seconds on every character inserted or deleted. This is even the case for small .bib files.Describe the solution you'd like
When editing (inserting or deleting characters) a line with citation(s), render citations as quickly as possible so that Emacs does not freeze.
Describe alternatives you've considered
org-cite-activate-processor
that activate citations differently. Different packages have different pros and cons to how they activate citations --- and having to install another package is not much of a solution with respect to citar. I did not like this solution.org-cite-basic-activate
incitar-org-activation-functions
with it. My version, below, is identical toorg-cite-basic-activate
but with faster rendering by using citar's functions which also leverage its cache (I believe). I currently use this approach.Additional context
I didn't have enough time to be 100% why org's built-in
org-cite-basic-activate
is slow, but I noticed that merely replacingorg-cite-basic--get-entry
andcitar-get-entries
with citar equivalents in the activate function does wonders with respect to performance on my machine.The text was updated successfully, but these errors were encountered: