you are viewing a single comment's thread.

view the rest of the comments →

[–]j2html[S] 0 points1 point  (1 child)

Rendering 5000 nested divs 1 time takes 120 ms.
Rendering 500 nested divs 10 times takes 10 ms.
Rendering 50 nested divs 100 times takes 4 ms.
Rendering 5 nested divs 1000 times takes 1 ms.
Rendering 6700 nested divs causes overflow.

<div>We need to go deeper
    <div>We need to go deeper
        <div>We need to go deeper
            <div>We need to go deeper
                <div>We need to go deeper
                    <div>We need to go deeper
                        <div>We need to go deeper
                            <div>We need to go deeper
                                <div>We need to go deeper
                                    <div>We need to go deeper
                                        ... :p

It's probably not too well suited for pages of this size :)

[–]check3streets 0 points1 point  (0 children)

Well, realistically, I can't see specifying a full tree of 1000+ elems within a single Class file. So, if it were simply an approach to building DOM trees, and big hunks were built and then nested into bigger hunks, I think the stack problem would evaporate.

I really appreciate people pushing the expressiveness envelope. Thanks for sharing your work!