RSS 2.0 Feed
Posted on August 7th, 2010 at 08:31 AM by Corey Ballou

I’m going to outline the process of switching from Apache’s default installation of MPM Prefork to that of MPM Worker. I will also be covering the proper installation of FastCGI (mod_fcgid) to further improve your server performance. This guide is ideally intended for individuals running on low-memory VPS servers as memory consumption will likely be far lower with the Worker MPM because it spawns threads as opposed to forking child processes. If you’re intentionally reading this article, you’re probably aware of the performance benefits gained.

The worker MPM uses multiple child processes with many threads each. Each thread handles one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM.

more »

Posted on February 10th, 2010 at 06:55 PM by Corey Ballou

I was vastly unaware of the number of useful functions built into Firebug beyond console.log(). The official Firebug site has a brief overview of the available commands which can be found here. Here’s a couple of quick examples to get you going.

You can use console.time() and console.timeEnd() to quickly log the time spent between the two.

console.time();
var str = '';
for (var i = 0; i < 1000; i++) {
    str += i;
}
console.timeEnd();

If you wish to profile the amount of time spent in each function call, you can use console.profile() in conjunction with console.profileEnd():

console.profile();
for (var i = 0; i < 1000; i++) {
    testFunction();
}
console.profileEnd();

function testFunction() {
    // dummy function
}

Lastly, you can call for a stack trace at any point in time by simply calling console.trace().

console.trace();