Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

use createDocumentFragment #4

Closed
fbender opened this issue Nov 2, 2012 · 1 comment
Closed

use createDocumentFragment #4

fbender opened this issue Nov 2, 2012 · 1 comment

Comments

@fbender
Copy link

fbender commented Nov 2, 2012

Creating the DOM tree with createDocumentFragment() and later add it to the actual DOM will bypass expensive Layout operations for each DOM method (Layouting is done only once during inserting the fragment into the actual DOM). This will speed up things a lot.

Plus, sometimes I want to prepare a DOM fragment and only add it later to the DOM tree. This is only possible with the aforementioned method.

@jed
Copy link
Owner

jed commented Nov 3, 2012

i tested domo using createDocumentFragment and didn't see much of a speed increase. can you make a test that shows this?

(note that the dom nodes are only appended to the document after creation, so there shouldn't be any layout overhead)

@jed jed closed this as completed Nov 3, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants