December 1st, 2005

What one Windows XP feature am I most proud of?

Of all the things I did for Windows XP, if I had to choose the one feature that I’m most proud of, it’s fixing Pinball so it doesn’t consume 100% CPU.

The program was originally written for Windows 95 and had a render loop that simply painted frames as fast as possible. In the checked build, you could tell the program to display the number of frames per second. They reserved room for two digits of FPS.

When I got to looking at Pinball’s CPU usage, I built the checked version and took a peek at the frame rate. Imagine my surprise when I saw that Pinball’s frame rate on contemporary hardware was over one million frames per second.

I added a limiter that capped the frame rate to 120 frames per second. This was enough to drop the CPU usage from 100% to 1%. Now you can play Pinball while waiting for your document to print without noticeably impacting printing speed.

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.