There is an unusual, and potentially very frustrating bug in Chrome’s DevTools (at least as of version 46.0.2490.80). It does not appear to have been documented elsewhere, so it is being recorded here in the hope that it may prevent some future hair-pulling.
If you’ve done much work with the HTML5 canvas API, and especially if you’ve ever looked into performance tuning your canvas apps, you’ve likely come across the advice to batch your canvas calls together. For example, you may have read that when drawing multiple lines or shapes, it’s better to create a single path and only call your draw method once, drawing all lines and shapes in one go, than it is to draw each line or shape individually. In other words, this:
After I completed a working version of my 3D rendering engine wireframe.js, I started looking for ways to make improvements, both in terms of performance, and usability. While both efforts are still ongoing, there are a few things I have learned with regard to performance that I wanted to get down in writing.
Prompted by the following question asked on reddit.com/r/webdev:
Hello, is it possible to sort something by popularity using only CSS and HTML? Or do i need to use something else like JS etc.?
I have devised the following solution: