Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the negative multithreaded scaling of cached glyph rendering in
vello_cpu.Before this change,
Finedid the following for everyEncodedPaint::Imagecommand:resources.image_resolver.resolve(id)Arc<Pixmap>All cached glyphs sample the same glyph-atlas page, so every worker thread hammered one shared refcount. In a
perfprofile at 4 threads:ImageRegistry::resolvewas 16.6% of samples, 98% of it on the atomic increment.paint_fillwas 24%, 90% of it just after the atomic decrement.Now
Finekeeps the most recently resolved image:This means one resolve per thread per image rather than one per command.
ImageSource::Pixmapis borrowed instead of cloned.Part 2 of 3 of the CPU glyph-cache speedups. It textually conflicts with the alpha-mask fast-path PR in
fine/mod.rs; whichever merges second needs a trivial rebase.Measurements
Throwaway probe: 1600×1200 target, ~9.3k glyphs, 14px,
atlas_cache(true), mean of 60 warm frames. Render time, main → this branch:With the cache on, total frame time at 8 threads goes from 11.2 ms to 4.1 ms. Uncached rendering is unaffected.
cargo test -p vello_cpu -p vello_commonpasses.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/55344a6e161d48b4a3a8688fabe11d4c
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/55344a6e161d48b4a3a8688fabe11d4c?variant=devin-insiders
Requested by: @nicoburns