linebender / linebender/parley

`FontCache::new()` consumes an absurd amount of memory

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.