linebender / linebender/piet

(D2D) clip<RoundedRect> is expensive

Open
#309 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

perf piet-direct2d
Dominant language
Rust
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Description

Admittedly my test case (https://github.com/smmalis37/sudoku_rust) with over 700 labels visible at once may be a bit extreme, but this shows up in profiling as one of the most expensive functions throughout the whole app. This is due to a combination of things:
- path_from_shape itself is expensive, spending lots of time in CreatePathGeometry, PathGeometry::Open and GeometrySink::close
- both CreateLayer and PushLayer take up a lot of time
- dropping the PathGeometry and the Layer at the end of the function are also surprisingly expensive

Contributor guide

Open the contributing guide

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 by profiling the clip path using the linked sudoku_rust case with more than 700 visible labels. Investigate the costs of path_from_shape, CreatePathGeometry, PathGeometry::Open, GeometrySink::close, CreateLayer, PushLayer, and resource cleanup; the issue does not define a target improvement or a specific completion test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.