Every little "bit" helps. « home
posted on 20:56 - 27 May 2010 | posted by Lev
last modified on 12:09 - 11 June 2010 | last modified by Lev
I've been busy the past couple of days at going through many of the commonly used classes in Theia and seeing what I can do to bring down memory (and database Query) usage. Though I actually managed to improve the speed with several areas in the last big update, and though speed still hasn't been an issue yet, I know it soon will be if I am not keeping on guard for it.
I haven't managed to make any dramatic memory reductions yet, but I am seeing improvements little by little. I run through the code looking for variables that don't need to be defined over and over, things that can be merged, things that can be moved to different places and all that sort of stuff. Then, I refresh the page over and over (in debug mode) and watch as the memory usage drop little by little. It's tedious, and sometimes I end up breaking something in the process without realizing it right away, but it's something every good developer should do from time to time.
If people think 10 bytes don't make a difference, they are fools. When 1,000 people perform the same request at the same time, that's 10,000 bytes. I've noticed a lot of developers these days seem to have this mentality that we all have unlimited processor cycles, RAM and bandwidth. That's a sad outlook, which in my opinion perpetuates a process of neglect - not to mention: it's awfully un-environmental, considering the more efficient your code is, the less energy your computer wastes. So in other words, writing elegant, process-conscious code is good for the environment.
Maybe we should fine developers who squander energy with inefficient code...?
Related Items »






