The live window on three threads
The live window had been built on one thread. I found it sluggish, and it was split into interface, logic and drawing threads, with a rule to use threads wherever they pay.
Read the entry: The live window on three threads
I asked for frame and loop rates. Every step counted as a change, because Blizzard's code keeps setting the same values, so the whole scene was redrawn every step. Setters that change nothing no longer count.
Then I asked whether logic and drawing were properly separated. They weren't: one thread did everything. I was shocked it had been single-threaded at all. Now a logic thread owns the world and Lua, a drawing thread paints, and the window's thread only shows pictures and passes input on. When I still saw single-digit frame rates, the painting was split across all the cores too: 50 ms a scene became 9.
My rule since: use threads wherever they pay.