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

[eluser]BrianDHall[/eluser]
First, doing performance measuring properly is, simply..."extremely hard". Its far easier to do it wrong than do it right. But basically you need to get something like microtime() in PHP before you run the test, run the test 100-10000+ times to get a large enough sampling to determine the actual time it took to run the tests, and do so in a way that you are sure something isn't getting cached or short-circuited so that every call of the function past the first one was happening far faster than it would "in the real world" (where a function isn't artificially called so many times).

Not to be overly opinionated, but unless you are having a site that will be drawing hundreds of thousands of users in a very short period of time, performance doesn't really matter. If you are getting that much traffic you should be getting a lot of money - and if you are, why don't you just deploy into a cloud environment or with a managed cluster? It doesn't cost THAT much more than other methods of hosting (the price is tiny compared to what you should be making if you are getting hundreds of thousands of viewers a day), and you don't waste your valuable time worrying about execution times when you could be building valuable applications.

If this is a purely intellectual/academic project...well then go right ahead Smile But proper execution testing is a science unto itself, and I wouldn't even know where to put you to get started, other than to articles that warn against premature optimization.

Now, on to debugging. I have one that I use and know works, so I'll just reccommend that. It's called PhpED, from NuSphere. There's a free trial you can download. To get debugging working in CodeIgniter you'll want to check out ZuggSoft's tutorial on setting up debugging for CI in PhpED

Then you just open up the index.php in the main directory where you put your CI project, stuff a DebugBreak() function call at the top, then visit your localhost server page and tada - PhpED will take you right to the breakpoint line and allow you to step through things one line at a time.

PhpED is so far the only editor I've gotten it working in, and it works great once you've set it up - though that does take a bit of work.


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