Welcome Guest, Not a member yet? Register   Sign In
CI code files compaction?
#1

[eluser]romero619[/eluser]
Just curious:
has there been any kind of effort to benchmark the use of CI with a base of code files that have been compacted (i.e., all comments & extra white space removed) ???

Perhaps the performance hit from all of the extra comments & linebreaks/whitespace might be negligible on an individual file basis, but, considering the relatively large number of files in CI that need to be loaded & interpreted by PHP, couldnt this have a cumulative negative effect on performance???

It would be interesting to test a 'compact' version of CI, with nothing but code (no comments or whitespace).

Im not a PHP or computer expert, but I do know that PHP is an interpreted language (i.e.,not compiled), so it *must* use some resources every time it loads a file and has to chew through 50+ lines of comments & linebreaks & whitespace, right?

again, I know this might be very negligible for most sites, but maybe it might add up in a very large, complex application, where squeezing every little bit of performance helps...

any thoughts?
#2

[eluser]TheFuzzy0ne[/eluser]
Not to my knowledge. I had a similar thought a few weeks ago, and everyone came to the conclusion that performance gain would be minimal, unless CodeIgniter was either written as a PHP extension or compiled into opcode.
#3

[eluser]Dam1an[/eluser]
Although I don't know about CI, I had a friend who wrote a script to compact CakePHP, and it made virtually o difference, and I'd guess there would be more benefit with Cake then with CI, as CI is already much more performant Smile




Theme © iAndrew 2016 - Forum software by © MyBB