Repository navigation
Anim: group animations by sequence in one pass (#410) - #472
Merged
Merged
Conversation
Timeline::with found trigger sequences with Vec::contains and then rescanned every animation once per sequence, and checked MAX_EFFECTS only after a match, so a slide with many distinct triggers cost quadratic work before the effect cap could stop it. Animations are now grouped once (an index by sequence, first-appearance order kept, main first), the build stops at MAX_EFFECTS before the next sequence, and paragraph groups are deduplicated with a set instead of Vec::contains. Co-authored-by: Cursor <cursoragent@cursor.com>
Member
|
Thank you for this contribution, @NikitkaRa! It has landed on If you haven't already, please come join us on Discord: https://discord.gg/artcraft |
anishguduru
pushed a commit
to anishguduru/deckcraft
that referenced
this pull request
Oct 16, 2026
…text (storytold#384) (storytold#472) Replacing text in a serif line (Times New Roman, say) with Cyrillic failed with "Japanese fallback font has no glyph for U+0444". The Type 3 fallback took only the style's first face, Shippori Mincho, which has no Cyrillic, although BIZ UDMincho and BIZ UDPGothic ship alongside it. `document_japanese_fonts_for_style` lists every Japanese face in the existing order of preference, and `type3_font` uses the first one that has a glyph for every character. If none has them all, the preferred face still names the missing character, as before.
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
Timeline::withgroups a slide's animations by sequence in a single pass (aHashMapindex into an ordered list). Sequence order stays first appearance, main first. Before, each trigger was found withVec::containsand then all animations were rescanned for every sequence.MAX_EFFECTSbefore starting the next sequence, so nothing past the cap is grouped or filtered again.ByParagraphtext builds) uses aHashSetinstead ofVec::containson the growing group list.Test plan
cargo test -p deckcraft-anim --lib: new tests for interleaved triggers keeping first-appearance order and step counts, and 110,000 distinct triggers (past the cap) building exactly 100,000 effects in order. The old code needed about 1.2e10 steps for that; the whole suite now runs in 0.11 scargo xtask ci(fmt, clippy, test, assets, layers, wasm)Closes #410