|
|
|
|
|
by esmevane
5113 days ago
|
|
Well, I'm pretty much going to use this approach from now on. Much cleaner and concise. If you look at the gist history you can see me updating my old code to include fat arrow, and other intuitive-with-experience tricks that I didn't know when I originally drafted the parent code in February. I'm curious - where did you hear that it was better performance? Or is this personal experience? |
|
Found this S.O thread http://stackoverflow.com/questions/10296791/backbone-js-perf... (different code, same concept) and decided to benchmark: Unqueued DOM insertion: http://jsfiddle.net/arkxp/9/ Queued DOM insertion: http://jsfiddle.net/arkxp/8/
The latter is consistently faster, and while the difference isn't a lot with this example, given a more complex insertion it'll mount up.