Bug 1876263 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)
> So in the profiles from bug 1850809 comment 4, there are some bits that are related. In particular `might_need_transitions_update` [shows up a lot](https://share.firefox.dev/3UtlJTZ).). This is on [NewsSite](https://speedometer-preview.netlify.app/interactiverunner?suites=NewsSite-Next), which uses a `transition: all .3s ease` for a lot of elements.
> 
> An interesting approach here could be to rejigger the code a little bit. We call [process_animations](https://searchfox.org/mozilla-central/rev/57516f1ab5660f9abf459300bc625279eb323213/servo/components/style/matching.rs#388,459) _before_ diffing the old and new styles.
> 
> For `all` transitions, it might be worth calling `accumulate_damage_for` _first_ between the old style and the after change style, then using that as an input if you have an `all` transition to skip checking all properties. Boris, thoughts about it / anything I might have missed / anything from the profile?
> 
> Might not be the cleanest tho... I need to think a bit more about it, but seems it could be workable?

Ya. `all` is used pretty often, so if we could optimize it, we definitely can have better performance in lots of website.

I'm not sure the detail of `accumulate_damage_for`, but it sounds OK with me because it might be a faster way to calculate the difference for all longhand properties (though we still have to check all properties on Gecko side for handling creation and cancellation).
(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)
> So in the profiles from bug 1850809 comment 4, there are some bits that are related. In particular `might_need_transitions_update` [shows up a lot](https://share.firefox.dev/3UtlJTZ).). This is on [NewsSite](https://speedometer-preview.netlify.app/interactiverunner?suites=NewsSite-Next), which uses a `transition: all .3s ease` for a lot of elements.
> 
> An interesting approach here could be to rejigger the code a little bit. We call [process_animations](https://searchfox.org/mozilla-central/rev/57516f1ab5660f9abf459300bc625279eb323213/servo/components/style/matching.rs#388,459) _before_ diffing the old and new styles.
> 
> For `all` transitions, it might be worth calling `accumulate_damage_for` _first_ between the old style and the after change style, then using that as an input if you have an `all` transition to skip checking all properties. Boris, thoughts about it / anything I might have missed / anything from the profile?
> 
> Might not be the cleanest tho... I need to think a bit more about it, but seems it could be workable?

Ya. `all` is used pretty often, so if we could optimize it, we definitely can have better performance in lots of website.

I'm not sure the detail of `accumulate_damage_for`, but it sounds OK with me because it might be a faster way to calculate the difference for all longhand properties (though we still have to check all properties on Gecko side for handling creation and cancellation, or perhaps only need for cancellation if we can make sure which transition properties need to be created).

Back to Bug 1876263 Comment 2