2 ms·
Not slow compared to what? Creating elements with the DOM API is faster than innerHTML roughly by a factor of 4 on Chrome Canary last I benchmarked it, DOM muta
by exomancer 10y ago
Not slow compared to what? Creating elements with the DOM API is faster than innerHTML roughly by a factor of 4 on Chrome Canary last I benchmarked it, DOM mutations with bindings are even faster. There is a reason why React switched from innerHTML to generating DOM.
- localvoid 10y ago>Creating elements with the DOM API is faster than innerHTML roughly by a factor of 4 on Chrome Canary last I benchmarked it yes, almost by a factor of 4 :D check out "render" test cases: https://cdn.rawgit.com/localvoid/dd96890b82f1d1268df34330b14c82a3/raw/aa03b789315a84dba047c642e7ab63fc04017692/uibench_chrome.html https://cdn.rawgit.com/localvoid/dd96890b82f1d1268df34330b14...