Skip to content

chore: Provide IBM Plex Sans to fix story app lag to nix - #2592

Merged
huacnlee merged 1 commit into
longbridge:mainfrom
Ziqi-Yang:fix/nixos-ui-font-lag
Jul 27, 2026
Merged

chore: Provide IBM Plex Sans to fix story app lag to nix#2592
huacnlee merged 1 commit into
longbridge:mainfrom
Ziqi-Yang:fix/nixos-ui-font-lag

Conversation

@Ziqi-Yang

@Ziqi-Yang Ziqi-Yang commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add IBM Plex Sans to the Nix development environment
  • provide a deterministic Fontconfig configuration when running the story app with Cargo
  • apply the same font configuration to the packaged executable wrapper

Why

GPUI resolves the Linux system UI font to IBM Plex Sans. On NixOS, that font was not available inside the development shell, so text rendering repeatedly took the missing-font fallback path. With RUST_BACKTRACE=1 enabled by the shell, those fallback errors also captured backtraces and caused high single-thread CPU usage during scrolling and other UI interactions.

Providing the expected font removes that hot path. In an 8-second runtime sample, CPU time dropped from approximately 4.05 seconds to 0.97 seconds, and profiling no longer showed unwind/backtrace work.

Testing

  • nix flake check --no-build
  • nix develop --command cargo run --release
  • verified fc-match "IBM Plex Sans" resolves to IBMPlexSans-Regular.otf inside the dev shell
  • nix build .#defaultPackage.x86_64-linux
  • launched the packaged executable through its generated wrapper

Related issue: #1621

@Ziqi-Yang

Ziqi-Yang commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

(Human) I've tested the PR. Before PR, scrolling in the gallary application (cargo run --release) feels very laggy. This PR fixes the issue for me.

@huacnlee huacnlee changed the title nix: provide IBM Plex Sans to fix story app lag chore: Provide IBM Plex Sans to fix story app lag to nix Jul 27, 2026
@huacnlee
huacnlee merged commit c2282af into longbridge:main Jul 27, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants