Welcome Guest, Not a member yet? Register   Sign In
How CodeIgniter Works?
#14

[eluser]BrianDHall[/eluser]
[quote author="Nick Husher" date="1252403728"][quote author="BrianDHall" date="1252134807"]First, doing performance measuring properly is, simply..."extremely hard". [/quote]

I'm just going to emphasize the "extremely" here. Testing a web application in a simulacrum of a real world environment is very very difficult. It's easier to have a real world environment of users to test your code's performance against to develop performance-enhancing strategies. Donald Knuth (an important computer science guy, if you don't know of him) famously said, "premature optimization is the root of all evil [in programming]." It's better to write something that's elegant, easy to write, and easy to modify now and figure out what you need to change when you start getting real traffic. A huge amount of performance can be gained just by turning on CI caching or a PHP bytecode caching solution. If you optimize your code now, you'll be doing yourself a huge disservice in six months when you realize you spent all that time for a 2% speedup when you get a 30% speedup by dropping in memcached or some other third-party solution.[/quote]

I shouldn't assume other people have read about premature optimization, so here's two links that are excellant on the subject: Optimization: Your Worst Enemy
and the wiki entry with references to mentioned Donald Knuth and others: When To Optimize

In short, you optimize after your system is built - not before. You don't intentionally do things that are painfully dumb, but for instance trying to use arrays instead of objects because arrays are faster ...yuck, terrible! Yet so many people suggest things of this sort, it's painful. Tiny tiny optimizations don't matter a little, they don't not matter at all - they are explicitly unredeemably bad.


Messages In This Thread
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:17 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:30 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:40 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:42 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:48 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 01:03 PM
How CodeIgniter Works? - by El Forum - 09-04-2009, 07:55 PM
How CodeIgniter Works? - by El Forum - 09-04-2009, 08:13 PM
How CodeIgniter Works? - by El Forum - 09-04-2009, 08:38 PM
How CodeIgniter Works? - by El Forum - 09-05-2009, 05:20 AM
How CodeIgniter Works? - by El Forum - 09-05-2009, 05:27 AM
How CodeIgniter Works? - by El Forum - 09-07-2009, 10:55 PM
How CodeIgniter Works? - by El Forum - 09-08-2009, 02:12 AM
How CodeIgniter Works? - by El Forum - 09-08-2009, 12:02 PM
How CodeIgniter Works? - by El Forum - 09-08-2009, 05:07 PM
How CodeIgniter Works? - by El Forum - 09-08-2009, 05:23 PM
How CodeIgniter Works? - by El Forum - 12-31-2009, 08:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB