Skip to content
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

Use a more performant org-cite activate processor by default #845

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

krisbalintona
Copy link
Contributor

As described in #842, citar uses the built-in org-cite-basic-activate which can cause significant slowdowns. This PR defines our own activate function, citar-org-cite-basic-activate, and uses it by default (replaces org-cite-basic-active in citar-org-activation-functions). This new activate function is identical to the built-in basic activate function but uses citar functions to speed up the expensive operations of the built-in activate function.

citar-org-cite-basic-activate is an org-cite activate processor meant to
be a more performant version of `org-cite-basic-activate`
… by default

Previously, `citar-org-activation-functions` used the built-in
`org-cite-basic-activate` processor. Now, we use `citar-org-cite-basic-activate`
by default instead.
@krisbalintona krisbalintona force-pushed the citar-org-activate-processor branch from 6d165af to cb4166a Compare October 22, 2024 23:21
@bdarcus
Copy link
Contributor

bdarcus commented Oct 23, 2024

Thanks!

The CI has picked up a linting error. Can you see about fixing that?

Come to think about it, it may be related to an earlier issue. I'll check back later today though.

EDIT: looks like recently org devs moved org-element-property and org-element-type to a new org-element-ast.el, that's what generating the error. Not sure how to address that ATM.

Seems like maybe:

(if (require 'org-element-ast nil 'noerror)
  (require 'org-element)
  (message "Loaded org-element"))

... and:

(if (featurep 'org-element-ast)
    (declare-function org-element-property "org-element-ast")
  (declare-function org-element-property "org-element"))

@krisbalintona
Copy link
Contributor Author

krisbalintona commented Oct 25, 2024

So, to be clear, should I be waiting for a resolution on main?

@bdarcus
Copy link
Contributor

bdarcus commented Oct 25, 2024

So, to be clear, should I be waiting for a resolution on main?

I don't think it matters. I was partly just updating to add notes for myself.

If I update it on main before merging, do you think it will be a problem for you?

@krisbalintona
Copy link
Contributor Author

krisbalintona commented Oct 25, 2024

If I update it on main before merging, do you think it will be a problem for you?

Nope, no problem for me 👍

@bdarcus bdarcus merged commit 02e25f3 into emacs-citar:main Oct 27, 2024
5 of 6 checks passed
@bdarcus
Copy link
Contributor

bdarcus commented Oct 27, 2024

I ended up merging this first, as I haven't yet figured out how to fix the issue with Emacs Master.

@krisbalintona
Copy link
Contributor Author

I ended up merging this first, as I haven't yet figured out how to fix the issue with Emacs Master.

Sounds good. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants