Welcome Guest, Not a member yet? Register   Sign In
Is this possible?
#1

[eluser]Hitesh Chavda[/eluser]
I have a question

If I am not wrong, Every time Someone request a page Codeigniter(almost every framwork) invoke its code and open bunch of class files, php parse it and display output, right?

suppose someone request following file named welcome.php. framwork loads all class file and display output.
Code:
echo "ONLY ONE LINE";


But everytime all the class file are loaded into memory than parser parse it. If this is right, this is not DRY principal.

Can we not do like load all the class one time in memory and when other files request some function then php load it from memory.

May be I look like fool But this is just my thought. Do you really understand what I want to say?
#2

[eluser]Colin Williams[/eluser]
You're thinking of a server as a CPU and not a, er, server. There is no open line between the client and the server (at least not until all browsers support Browser Sockets, which is probably more than a decade away).
#3

[eluser]Unknown[/eluser]
If your server has eacceletor you will get what you're talking about.

It loads all the classes to memory and saves you about half a time to produce the result.

But if you rebuild loader class and some other classes and put all the engine scripts in one index.php file you will get more then 90% time save. And some memory save although.




Theme © iAndrew 2016 - Forum software by © MyBB