Skip to content

Conversation

@tecosaur
Copy link
Member

This is a follow-up to #79, see the commit message for more details.

I've been wary about doing lazy application of load_customisations!, but
with the @noinline addition the calls are really cheap: only 1.5ns
according to Chairmarks on my machine. Thus, the cost of calling it
after initialisation will be negligeable for any non-trivial function.

Having rolled this around further, other than printing I think only
withfaces calls actually require loading of user styles to be valid.

With these two realisations, calling load_customisations! lazily as
appropriate seems like a bit of a no-brainer.

We'll probably want to add this to public API eventually for
non-text/html output implementations, but we can wait to see how this is
bourne out first.
@tecosaur tecosaur merged commit da41b6a into main Sep 20, 2024
5 checks passed
@tecosaur tecosaur deleted the lazy-init branch September 20, 2024 15:14
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.

1 participant