cosmic-text icon indicating copy to clipboard operation
cosmic-text copied to clipboard

feat: concurrently load & parse fonts

Open Itsusinn opened this issue 2 months ago • 4 comments

This will reduce load time from 2376ms to 388ms when loading many huge fonts

Itsusinn avatar Apr 28 '24 10:04 Itsusinn

@jackpot51 Could you please take a look?

Itsusinn avatar Apr 28 '24 10:04 Itsusinn

https://docs.rs/rayon-core/1.12.1/rayon_core/index.html#global-fallback-when-threading-is-unsupported

~~I just find rayon supports no_std, maybe it's unnecessary to add rayon feature-gate?~~

Itsusinn avatar Apr 28 '24 11:04 Itsusinn

That's not the same as no_std. If the crate doesn't have a std feature (and otherwise uses std features), then it doesn't support no_std.

CryZe avatar Apr 28 '24 12:04 CryZe

That's not the same as no_std. If the crate doesn't have a std feature (and otherwise uses std features), then it doesn't support no_std.

Understood

Itsusinn avatar Apr 28 '24 13:04 Itsusinn