Welcome Guest, Not a member yet? Register   Sign In
CI for highload projects, does it useless?
#1

[eluser]smi23[/eluser]
Hello everyone. Recently, I was confused by the following statement:

"Any framework will decrease the page load time (by loading the processor) much more than pure PHP for highload projects (>50k visitors)." And by "pure PHP" was meant: no OOP, no MVC, no ORM - just the code needed to display required data (each time run mysql_query() directly and then immediately echo html via 'while'); minimize the variable usage and etc.

Please, tell me what you think, how do you handle with such a big traffic? I have no experience with highload projects and can't argue against that nonsense.
#2

[eluser]solid9[/eluser]
First of all where did you get that statement?
There are many ways to speed up a website.
By optimizing the codes of CodeIgniter.
By optimizing the codes of ActiveRecords/MySQL.
By using cache.
By using mod_pagespeed https://developers.google.com/speed/pagespeed/mod
etc... etc...

It might perhaps decrease but very minimal.
#3

[eluser]smi23[/eluser]
Thanks for the response.
I've came to a new job, and theirs head programmer tells me that this is the only way to make application fast. He's older than me on 8 years, and bunch of my arguments didn't convinced him that coding his way is ridiculous.
#4

[eluser]Ewout[/eluser]
Well, first of all: changing the mind of a developer who's been doing something some way for such a long time is very hard... you can try to convince him, but it is realistic they just don't accept your arguments..

On topic of your question:
As solid9 said, it isn't as simple as the statement you started with. There is no reason why a codeigniter-based application couldn't be scaled for highload projects. But it depends on a bunch of efforts from your part:
Minimizing database queries
Caching obviously (automatic or own systems)
How extended a normal page request is with automatic library calls, etc ..

Although it is correct to say 'pure PHP is faster then OOP', using a framework is obviously worthwhile..
If you are working in a team of programmers, a framework is a bless compared to 'pure' bunched up PHP.
#5

[eluser]boltsabre[/eluser]
I'd have to also wage in on this and say the the overheads of a lightweight framework (such as CI, as opposed to some monolithic monster like Zend) as absolutely minimal.

The footprint of CI is TINY.

If you find that CI, compared to vanilla PHP, is having a major impact on your page load speeds, that is a problem with your servers (ie, UPGRADE THEM!), not this framework.

Obviously there are things that can and should be done to help speed the website up, as mentioned above, but as I said, if it's a matter of using CI crashing/slowing things down, it's more than likely a hardware problem, not programmatic.

Things such as careful selection of autoloading libraries and helpers should be considered (ie, do you really need to auto load the form helper as many tutorials I see suggest... in most applications you shouldn't).
Caching is another big one.
Damn, I speed up my companies website by about 20-30% (when JS was disabled, we have lots of Ads and social plugins) just by combining images into sprites...
Then there is image optimisation.
Using a CDN.
Database optimisation (using appropriate selects, joins, rebuilding indexes? profiling?)
Do you host your own jQuery file, or use on from a CDN, if JS deferred until after the DOM/Page load?
Do you use appropriate inline VS external CSS styles? Especially inside loops?
And a whole bunch of other things that you can do to speed up a website.

Really, PHP shouldn't be much of an issue if you have proper hardware installed and if you are smart about your code, 9 10th of page load speed is http requests, packet transfer, and browser rendering, not server side code execution.
#6

[eluser]smi23[/eluser]
Big thanks!
Now I feel much better - you're thinking the same way as I do.




Theme © iAndrew 2016 - Forum software by © MyBB