Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 2.0 Memory comsumption
#1

[eluser]hykoh[/eluser]
Hi there,

i tried Codeigniter 2.0 with a new installation and output the benchmark (elapsed time + memory) .. no dynamic stuff .. just one controller with one method. The autoload.php includes 'database' and 'session'.

At my CodeIgniter 1.7.2 installation which includes alot of other libraries at the autoload, the results are:

Code:
1.22MB
Time: 0.0101

At CI 2.0, it is:
Code:
2.7MB
Time: 0.0107

Where is the memory consumption come from ??? If i add the ion_auth library to the autoload.php, it even takes:

Code:
3.67MB
Time: 0.0201

Anyone who has the same results ?
#2

[eluser]WanWizard[/eluser]
I have a test environment here (for Modular CI) for both 1.7.2 and 2.0. The environments are completely identical.

When I add the profiler to the welcome controller of both, I get:

CI 1.7.2:
Code:
3,307,160 bytes
0.0110 seconds

CI 2.0:
Code:
3,490,512 bytes
0.0125 seconds

In both cases only the database library (using mysqli, to the same database) is loaded, and the library extensions needed for Modular CI (which are identical for both CI versions).
#3

[eluser]hykoh[/eluser]
strange ...
#4

[eluser]InsiteFX[/eluser]
CodeIgniter 2.0
Welcome Controller and View
Database and Session autoloaded

This is what I get:
Code:
Memory usage: 1.79MB

Page rendered in: 0.0121 seconds

Powered by CodeIgniter 2.0

InsiteFX
#5

[eluser]hykoh[/eluser]
any ideas why i am over 3.5 MB at CI 2.0 and 2/3 less consumption at CI 1.7.3 ???
#6

[eluser]WanWizard[/eluser]
You have to be careful with interpreting these kind of figures, as they depend heavily on the version of PHP used, and it's configuration.

My staging server runs exactly the same OS, Apache and PHP version as my development environment. And still the profiler reports different memory usages when I request exactly the same application page (database contents is identical too).
#7

[eluser]hykoh[/eluser]
ya, but it is running at the same server with the same versions
#8

[eluser]WanWizard[/eluser]
If you really want to know what's using the memory, install xdebug and run a trace.




Theme © iAndrew 2016 - Forum software by © MyBB