Monday, January 10, 2011

What makes your site slow the most? System Calls.

Hello,

Today I will talk about a highly discussed topic. But I'm not going to talk about the usual reasons given for this. I'm going to talk about a much unknown and and un-talked factor. The system calls.

Believe it or not, the most time taking process in site execution is the "System Calls". Whenever you "require" or "include" a file, it makes a system call on server to include that file in your script. So it depends upon how many files you are including in your script. In today's world of MVCs, there is literally no limit of the files you include. This is not to take away the fact that MVCs are marvelous platforms to build any web application (for many reasons) but they do have impact on the speed. The reason behind Magento being slow is much more this.

If you want a phenomenal speed, write the whole code on a single file! I know it sounds ridiculous but the applications who have a HUGE amount of load everyday, do exactly this! Example SourceForge and GForge. They have millions of lines of code in a single file.

However, MVCs do have the work around for this problem. They do caching. Using caching they evade this short coming greatly. And we all know the power of MVCs.

So guys, keep using MVCs for all the reasons. But it's just that when you create a SourceForge or GForge, avoid them!

No comments:

Post a Comment