Yesterday I discovered something interesting in programming. When the owner/lead programmer of a framework/project writes code, he/she don’t optimize it after wards. The programmer just continues to develop on top of the existing code, adding enhancements, without improving the existing code.
I found an article on OSFlash that discusses how to optimize Flash’s Actionscript 3 language. There are several other links on that page that link to other developer’s blog experiences and finds on speed optimization. I HIGHLY suggest ALL developers to read and look into it, as well as doing their own speed test experiments (it can be quite fun actually).
I used the tips and tricks in the OSFlash article towards my GOOPJS framework, to optimize speed and memory. Using the keyword ‘var’ less when declaring a variable to save memory and time was a big help. It seems to run the
tween method/animation a bit smoother. Other little fixes I did to save file size, was removing unneeded quotes for objects properties. I also implemented an Object called Overlay which opens a div on top of the page, a Class called AllowTabs, to allow tabs in textareas, rewrote the DOM Object to run more efficient and be called sooner, and other little small fixes.