linebender / linebender/parley
`FontCache::new()` consumes an absurd amount of memory
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 736
- Forks
- 120
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 53
Description
parley is currently used in xilem for text stuff.
I did some heap profiling and discovered that FontCache::new() consumes an absurd amount of memory (1.8 GiB, precise measurements in the link)...
It seems that was parley does is to load every font of my system into memory?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FontCache::new() and the heap-profile details linked from the issue, then trace how system fonts are discovered and retained. Done should mean that constructing the cache no longer consumes roughly 1.8 GiB by loading every system font into memory, with the memory usage verified against the reported profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100