Closed ghost closed 9 years ago
I don't understand how localvoid/vdom-benchmark#15 (comment) is related to rendering after appending. There's written about using of innerHTML
for IE.
What do you mean by "You would avoid touching the DOM for every child". How? I don't understand how is possible to append child to parent node without touching DOM?
"Maybe it is because" — it's not enough. Do you have real benchmarks proving that?
I there defined var rootNode = new Node(dom); only once, and after that I do render(rootNode); if the root node don't exist. Else I do this: render(dom.rootNode); where the rootNode is the parent node where you inherit from.
I don't understand completely what you have written about.
I see the following:
render: таймер запущен show:161
render: 3.09мс show:163
render: таймер запущен show:161
render: 0.96мс show:163
render: таймер запущен show:161
render: 0.65мс show:163
render: таймер запущен show:161
render: 0.63мс show:163
render: таймер запущен
render: 3.69мс show:163
render: таймер запущен show:161
render: 2.96мс show:163
render: таймер запущен show:161
render: 4.48мс show:163
render: таймер запущен
...
I don't understand what it is and what it proves.
What do you compare with? I need to see the same test with vidom.
You can make two simple tests to prove your point. The first, when children DOM is rendered before node is appended to parent and the second, when children DOM is rendered after node is appended to parent.
https://github.com/dfilatov/vidom/blob/master/lib/client/mounter.js#L27 -- root node is injected after all inner DOM is rendered. I think we don't understand each other, at least me. To improve understanding I suggest you to create two simple tests as I written above.
And what? You have given two completely different tests. How can they be compared?
Once more, please, I suggest you to make two simple and CLEAN tests (without any mess).
DOM is touched only once when the root virtual node is mounted. All children are already rendered by that moment so there's no redundant DOM operations.
in IE citojs is faster cause renders dom via string
...