chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Improve startup time

Open walles opened this issue 1 year ago • 0 comments

By not loading styles until they are needed.

This takes moar's startup time down from ~25ms to ~18ms on my machine.

One potential downside of this change is that NewEmbeddedXMLStyle() is added to the public API.

But since styles are split between style.go and styles/api.go I was unable to come up with a solution that didn't change the public API.

Also I'm unsure whether the improved startup performance is worth the extra complexity (which isn't bad really, but still). You be the judge of that.

walles avatar Apr 08 '24 05:04 walles