Repository navigation
Add Complex DOM required changes to standalone TodoMVC apps - #239
Conversation
|
@flashdesignory In all but one implementation (backbone). The |
|
As sanity checks, can we get before/after numbers on each browser? |
|
Just quickly checking locally I'm seeing some pretty large slowdowns on a number of tests. I would have expected only a bit slower with the extra bookkeeping. I wonder if this has to do with #239 (comment), and if so, if there may be a more efficient way to get the effect we want in terms of providing matching selectors for the complex CSS. Will take a closer look at it tomorrow. |
|
I suspect what's happening is that the deleting step gets a lot slower since we loop through from 0 to 100. So when the first item is removed there's some new framework-specific re-render work necessary for the next 99 items and so on. Thinking about how a todo app would likely work in the wild, I think this ID would be stable regardless of its position in the list (as it would i.e. be fetched from a database). This may be inconvenient to change but I have a couple ideas:
|
|
I've prototyped approach 2 (which I think would be the easiest change to make) in https://reverse-removal--speedometer-preview.netlify.app. This can be compared with the current changes in the PR at https://lpardosixtos-addtodomvccomplexdomchanges--speedometer-preview.netlify.app/ |
|
Results from a MacBook Pro using crossbench as follows. The total scores are roughly the same with the reverse removal applied, although in practice what's happened is most tests have gotten a bit slower (as I would have expected) and the existing React Complex DOM test has gotten a lot faster. This is because that test is already shipping the behavior with the re-renders during removal and so this optimizes that back to baseline / matching the current behavior on tip for the other Todo workloads) Current score:
With the reverse-removal commit on top of the current PR:
With the current PR:
|
|
Note that the reverse removal commit also appears to fix an existing bug in the Svelte test where all items are not being deleted (Step through on https://speedometer-preview.netlify.app/interactiverunner?suite=TodoMVC-Svelte vs https://reverse-removal--speedometer-preview.netlify.app/interactiverunner?suite=TodoMVC-Svelte), so there is marginally more work happening in that patch though the time stays pretty much the same across browsers. |
|
@rniwa @flashdesignory thoughts? Should we move forward after applying bgrins@f6d5f91 on top this? |
Thanks for the quick solution. This makes sense to me and I'm voting for applying the patch. |
|
Can we get new before/after numbers? |
the first two images in #239 (comment) have before/after if we take the suggested fix in #239 (comment) |
|
Alright, I've collected data of my own on 16" M2 MacBookPro. It looks like this change is neutral overall.
Chrome
Firefox
Safari
|
|
One question I had regarding the changes: Current proposed changes are something like below: Could we do something like this instead? |
|
actually, disregard my comment, I think I see the reasoning why... |
|
@lpardosixtosMs alright, sounds like we can land this once you include the reverse removal change (bgrins@f6d5f91) |
|
@bgrins I included the reverse removal change, it is ready to land. Thanks for the review! |



This PR prepares the standalone TodoMVC implementations to be embedded in the Complex DOM UI.
targetedclassname and ali-<index>classname to all the TodoMVC list items. Required for triggering the generated CSS rules.targetedclassname and aview-<index>classname to the direct children of all the TodoMVC list items. Required for triggering the generated CSS rules.