Chrome DevTools Synchronous XHR Redirect Bug

Posted October 24, 2015 by ebenpack

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.

Canvas Path Performance

Posted August 31, 2014 by ebenpack

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:

A Load of Garbage

Posted August 28, 2014 by ebenpack

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.

Sorting with CSS

Posted August 22, 2014 by ebenpack

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.?

- /u/justanewboy

I have devised the following solution:

Too Much Recursion!

Posted July 30, 2014 by ebenpack

I was reading ‘Data Structures and Algorithms in JavaScript’ by Michael McMillan the other day. While the book as a whole is absolutely riddled with errors, this passage struck me as being particularly egregious.

It is customary, though not necessary, to implement Mergesort as a recursive algorithm. However, it is not possible to do so in JavaScript, as the recursion goes too deep for the language to handle. [emphasis mine]