I'm new with XDebug. I see it like a "must have" tool to make sure the app im coding is done well.
Here's my setup : - MAMP on Macbook Air. - Zend XDebug activated in PHP.INI - Webgrind for reports
I made all the configuration to make the profiler running and it works great.
My only question about this is what should I look and worry about. Some people says that the whole php process shouldn't be over 100ms maximum, closer to 50ms the better.
Ok well, thats a good start...
Any body could be more clear on what to check, what is acceptable and what is not?
Thanks.
It's not so much a matter of what's acceptable.
It's more a matter of seeing what it is spending a lot of time doing, and seeing if you can think of a way to reduce that.
xDebug shows stack traces if you interrupt it (by Ctrl-C, or Escape, or whatever), and that is very useful information.
For example, suppose it is spending 40% of its time allocating some chunk of memory, and discarding it, when it could be done just once, or parsing some string multiple times when it could be done just once, or something neither of us could guess ahead of time, but once you see it, you slap your head and say "I can do something about that!"
Well, when you interrupt it, there's a 40% chance you will see it (on the stack). Interrupt it again, and again, until you've seen it twice. On average it should take 2/0.4 interrupts, or about 5. When you've seen it twice, you've found a juicy speedup. (You don't know it's juicy until you see it twice.)
Then rinse and repeat, because something that was smaller before is now a larger percent of the time. You will quickly make the code as speedy as anyone's.