I’ve had this blog post on my mind for a good long while now, brewing, as I collected more and more ammunition for the day that I finally got annoyed enough to put this down on paper, or blog, so to speak. Over the last 6+ months the debate between developers on the web front have been adamantly defending their technology choices and presenting the best cases they could think of to prove to the other side why their technology choice is better.
Personally, I have been just as guilty as the next dev of adding fuel to the fire. Instead, what we should be doing as Flash developers, and as JavaScript/[insert your preferred language] developers in general, is making sure that the software that we put out to the public is the best software we could possibly make. Sometimes this means being up to date with all the latest and greatest frameworks for your language. Other times it means learning a spiffy new debugging tool, or a completely new IDE that makes you write code 10x faster than you did with your last IDE. Sometimes, it simply means 1 simple thing, and pardon my french here, but, KILL YOUR FUCKING TRACES!
Start Rant:
There are several reasons to do this, but in a time where everyone in the web development community is looking at Flash developers and looking for any reason to say, “See, I told you Flash sucks.”, we as Flash developers need to make sure that we at least take the simplest of steps to make our Flash SWFs run as smooth as possible. Even on the fastest of computers a single trace statement can bring your application, and the user’s computer, to a grinding halt. Its as if a lot of developers believe that because it is a simple trace() statement that it shouldn’t or doesn’t hurt performance, when in actuality it does. Even on SWF files that I have compiled with “Omit traces” on, if you run “tail -f /path/to/ur/flashlog.txt” you will still see all those traces that a developer would think are no longer being executed with “Omit Traces” on. With the entire web development industry now looking at how Flash performs we must be more diligent about doing simple things like this. This type of simple oversight is EVERYWHERE. Lets see what I found while doing a quick search online…
As soon as I hit “tail -f …” I was immediately bombed with traces. These traces below come from Google’s video adwords, I guess its important for the user’s computer to know that the “Font still too big even at minFontSize”. I can rest easy at night now.

Next is CNN.com, the video player here is nuts. I think they trace enough information from their video player to reverse engineer it from traces. As soon as I loaded this page my Terminal was off the charts, this screenshot does not give justice to their trace mastery. You are also greeted by several welcome messages, also known as Run Time Errors.

ESPN.com is just as bad, this is what shows just by loading their home page.
These are just three quick examples, I can sit here all day and call people out. The point is, it is so simple to make sure your applications have all traces commented out, it improves performance in our Flash SWFs, and it gives people one less thing to bitch about Flash.