Patrick Bateman: (Looking at the business card) “Look at that subtle off-white coloring. The tasteful thickness of it. Oh my god…”
I finally understood the full extent of Bateman’s jealousy recently when reading about the MVC Mini Profiler created by the Stack Exchange team. My eyes scanned all the features, and I started to lose my mind:
…my god, it even had a watermark.
As Jeff said, simply showing a render time for all pages can be critical
It really hit home for me when reading Sam Saffron’s post: “No web frameworks seem to provide a comprehensive approach to page profiling out of the box.” It’s true. This level of ubiquitous profiling baked right into all major web frameworks would really change the game. I decided I couldn’t live without something like mvc-mini-profiler any longer, so we just released gae_mini_profiler.
gae_mini_profiler is a drop-in, ubiquitous, production profiling tool for Google App Engine heavily inspired by MVC Mini Profiler. Since App Engine and MVC have so many fundamental differences, the tools aren’t identical, and it’s not really a port as much as a ridiculously kindred spirit. If you want, you can play around with a gae_mini_profiler-enabled demo of GAE’s example chess app — in this demo case, the profiler is enabled for all users.
Taking a glance at one of our slower pages in production
I’m confident that always having all of this data right in front of our developers as we browse around the live Khan Academy site will improve performance. I’ve already noticed a few problems I didn’t previously know about in just the first few hours after deploying.
AJAX calls stack up as they come in, ready for examination
You can dive deep on the details of each request
All props go to Jarrod, Sam, and probably the rest of the Stack Exchange team for blazing the path with mvc-mini-profiler and inspiring this tool. I borrowed ideas ranging from basic UI to dupe query detection to jQuery.tmpl usage to ajax request stacking to lots of other stuff I can’t remember. The sizable differences in the tools really spawn from the type of data I get from Appstats and cProfile.
The project is obviously young, but any App Engine app should be able to drop it in quite quickly with minimal configuration. Instructions are at the repo, and I hope others find it useful.