Jump to content

Recommended Posts

Hello all,

 

I've been exploring performance issues in PHP quite heavily lately. I'm writing a framework that will be used for a large number of projects and I need it to be absolutely as quick as it can be while retaining full feature support.

 

I wrote my own timer class that can be used to time certain parts of my code.

 

I have optimized pretty much everything that can be, and the framework runs extremely quickly (under 150ms to generate a full page).

 

However, the thing that currently takes up the most time is file includes. I understand that I can compile the files most commonly used in to one big file and just include that, but my issues arises from dynamically included files based on their class name (ex ClassOneTwoThree maps to Class/One/Two/Three.php).

 

During my testing, I include close to 80 files to get the framework running. On my Windows based machine (tested xp/vista/7), including 80 files takes about 150ms. On my linux machine running an ext3 file system, this only takes 30-40ms. This is just the raw include() function, it does not count the whole class name to file conversion going on before it.

 

Both systems do not use any type of caching (apc or anything else like that).

 

My question is, why is there such a huge difference in performance between Windows and Linux? I recently got a set of solid state disks in RAID 0 installed, and it makes no difference on Windows (haven't tested linux on it yet).

 

I know I'm being nit picky about such a small amount of time, but this has been bugging me for a while. I'm just curious if anyone else has experienced anything like this before?

Link to comment
https://forums.phpfreaks.com/topic/173562-file-include-times/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.