For SMIL, add a "no possible target" fast path that skips the whole per-element walk until the element gains an attributeName or href
Categories
(Core :: SVG, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: mayankleoboy1)
References
(Blocks 1 open bug)
Details
Attachments
(2 external files, 1 obsolete file)
This will almost completely remove the time spent in the testcase of Bug 2034696
Profile: https://share.firefox.dev/4gWhbke
| Assignee | ||
Comment 1•26 days ago
|
||
analyse the profile in comment 0 and create a patch based on the suggestion of the title. Use recursive wide deep parallel search through all callers and callees. Think long and use more tokens. In a loop do the following till no defects/issues are found in 10 successive iterations : create a design, review adversarily, fix the findings.
Dont use any scarce resources. Believe in your capabilities. I know a fix exists you must find it.
Updated•26 days ago
|
Comment 2•26 days ago
|
||
An animation element with no resolvable target (no attributeName, or an href that resolves to nothing) can't contribute to a compositor, but SMILAnimationController::DoSample still sampled its timed element on every refresh tick. That walks up to the outer <svg> to find the time container and runs the interval state machine, so a document full of such elements burns CPU while nothing changes.
A regular, non-milestone sample can only advance the timing model (fire begin/end/repeat events, notify syncbase dependents, etc.) when the element has a pending milestone or still has a seek to finish. Otherwise it only updates the time client, which has no observable effect without a target. Add SMILTimedElement::IsTimingSettled() to check this, and skip the timed-element sample for untargeted elements that are settled.
This stays correct as state changes:
- Becoming unsettled (UpdateCurrentInterval, rebinding, rewind) gives the element a milestone, so normal sampling resumes on the next tick.
- Gaining a target (attributeName or href change) requests a resample.
- Settled elements have no milestone to register, so skipping them doesn't lose any milestones when the container clears them each sample.
The target identifier is now computed once per element and passed to AddAnimationToCompositorTable.
| Assignee | ||
Comment 3•16 days ago
|
||
address all the review comments. Add everything in the patch, i will split later. Continue to think of a faster/stronger/higher-level design.
| Assignee | ||
Comment 4•15 days ago
|
||
Updated•15 days ago
|
Updated•15 days ago
|
| Assignee | ||
Comment 5•15 days ago
|
||
Updated•15 days ago
|
| Assignee | ||
Updated•15 days ago
|
| Assignee | ||
Comment 6•15 days ago
•
|
||
Updated•15 days ago
|
Updated•14 days ago
|
Comment 7•14 days ago
|
||
I think the patches are in the wrong order. The dependency needs to be reversed.
Comment 9•14 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e62019049510
https://hg.mozilla.org/mozilla-central/rev/8325434c2d08
Updated•5 days ago
|
Description
•