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

FontSystem::new() takes a significant amount of time #91

Closed
notgull opened this issue Mar 1, 2023 · 5 comments
Closed

FontSystem::new() takes a significant amount of time #91

notgull opened this issue Mar 1, 2023 · 5 comments

Comments

@notgull
Copy link
Contributor

notgull commented Mar 1, 2023

On my system (Xubuntu), running FontSystem::new() takes a significant amount of time. On release, it takes around a second to run. On debug, it takes up to ten seconds.

There should probably be some measures taken to make sure FontSystem runs quickly. However, it should also be noted somewhere that FontSystem takes a while to load.

@jackpot51
Copy link
Member

The major time is due to mapping every font, I believe. Lazy mapping would help a lot.

@notgull
Copy link
Contributor Author

notgull commented Mar 4, 2023

If the fonts aren't already in hot memory that can take a while as well. I just recorded system font loading taking 30 seconds on debug mode.

@soloturn
Copy link

is this the same as pop-os/cosmic-edit#3 ?

@jackpot51
Copy link
Member

Lazy mapping is merged, please see if this is fixed

@notgull
Copy link
Contributor Author

notgull commented Mar 18, 2023

Looks good to me from a glance, I'll post more in-depth statistics later

@notgull notgull closed this as completed Mar 18, 2023
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

No branches or pull requests

3 participants