-
Notifications
You must be signed in to change notification settings - Fork 481
Fixes issue #513 #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes issue #513 #526
Conversation
I'm not sure I agree with the wording here. I'd rather see something about how constantly manipulating the DOM is an expensive operation and by creating an internal reference and working with that reference and touching the DOM once at the end when we append it to the container we're being considerate of the performance considerations. |
See also #560, basically right now we've got nothing separating the bad example and the rewritten version, and I think the actual intent with this second example there is to abstract the setting that would be set. I would kind of like to see the example be rewritten such that we use a class instead of an ID (for both the bad and good version). We should also include a section as @RedWolves described, or rewrite the bad version such that It also stores the created div (to not need to then talk about that optimization) Considering the title this section is under is Willing to take on these changes and updates @AurelioDeRosa ? |
ping @AurelioDeRosa about the above. Also, for the reference: this would close #560 too. |
I'd like to update the PR to take all the opinions expressed here into account. So, to summarize, the page should be updated to clearly separate the bad example from the good example. In regard of the proposal to show an example using the ID selector vs the class selector I don't see much value for the readers. I mean that the performance are different but in that specific discussion I don't see the value of showing the same example twice with a different selector. Any idea? |
I think both examples (even the "bad" case) should use classes instead of ID, and "cache" the selection, making the only "improvement" |
or in other words, "giving control over the element" |
Updated PR based on comments
No description provided.