-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
Optimize Content::has
, Introspector::query_label
, and MetaElem
#2759
Conversation
Merge with upstream
Content::has
method use a non-allocating trait-methodContent::has
and Introspector::query_label
The difference these small changes makes is actually surprising, when editing references (i.e bibliography & headings) it actually provides a surprising 11% decrease in incremental compile time, so a bigger win than one might expect, likely due to the reduced amount of cloning. It also provides a small bump in cold compile of about 8% on masterproef which also surprises me, but we take the gains we get. |
Content::has
and Introspector::query_label
Content::has
, Introspector::query_label
, and MetaElem
Thank you! |
See the title.
It allows
has
to not allocate which while a small optimization on large documents and templates should really add up.It also optimizes
Introspector::query_label
to be reference based, this does several things:RefElem
that are actuallyCiteElem
RefElem
when it's an actual referenceFootnoteElem::declaration_location
Also makes
MetaElem
beUnlabellable
to make it smaller. I'd go as far as making it a custom impl withoutlocation
,span
, etc. too