Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
Hey, I enjoyed the article. I also agree with the points you raised. Thanks for the good content :).
Nevertheless, I just want to point some things out that I feel are minor issues in the article.
In the first snippet of code presented. The tests don't seem fair. For the object, i is being set every time, not appended to. However, for innerHTML, i is being appended. This makes the measurement far slower. This is both because of layout thrashing, but also because the resulting string is huge (2,890 digits long). However, the main point still applies. When I tested just setting the value innerHTML, it was about 20 times slower than the operation on the object.
Also, the code snippet with the function generateList doesn't seem to work. I tried created sufficient HTML for it to run, but got a few errors.
Anyway, I still enjoyed the article overall. Keep it up :).
Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
Yeah I gotcha. That's all good, as I said I still think it's a great article :). Yeah I was nitpicking a bit because I like actually running through the examples for more clarity :)
Hey, I enjoyed the article. I also agree with the points you raised. Thanks for the good content :).
Nevertheless, I just want to point some things out that I feel are minor issues in the article.
In the first snippet of code presented. The tests don't seem fair. For the object,
i
is being set every time, not appended to. However, forinnerHTML
,i
is being appended. This makes the measurement far slower. This is both because of layout thrashing, but also because the resulting string is huge (2,890 digits long). However, the main point still applies. When I tested just setting the valueinnerHTML
, it was about 20 times slower than the operation on the object.Also, the code snippet with the function
generateList
doesn't seem to work. I tried created sufficient HTML for it to run, but got a few errors.Anyway, I still enjoyed the article overall. Keep it up :).
I was just looking for a quick and easy way to show you stuff and I didn't actually take the time to test it too much. Thanks for pointing those out!
Yeah I gotcha. That's all good, as I said I still think it's a great article :). Yeah I was nitpicking a bit because I like actually running through the examples for more clarity :)
Me too, but not on my articles 😂