PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > profiling newb
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
profiling newb

Réponse
 
LinkBack Outils de la discussion
Vieux 11/09/2007, 05h06   #1
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut profiling newb

all,

i am just getting my feet wet w/ profiling.
its nice to see i can invoke a page from the browser then
see an analysis in kcachegrind using xdebug to generate the data.
however, im curious about 'finding the weak spots in an application'.
say for instance i arrive at a new location as a consultant or w/e;
point is assume a totally foreign codebase that needs to be
optimized. theoretically 'profiling' would be a way to analyze the
application and determine where the slow points are, which methods
are getting called repeatedly and so forth. then those areas could be
analyzed for potential gains.
it seems to me though, that since generating a series of cache files
is a manual process and the analysis a manual process it would take
a long time just to profile an application. so someone familiar with
said application could point out the slow spots much more quickly
than a person using a profiling tool.
is there a tool that can analyze a large number of cache files and give
some sort of comprehensive report? it seems very natural to have cache
files get generated in a pre-production site for analysis. if they could be
sent through something that generated a comprehensive report that would
really reduce profiling time rather than having to look through them one at
a time.
or am i missing something because im new to profiling ?

thanks,

-nathan

  Réponse avec citation
Vieux 11/09/2007, 05h44   #2
Chris
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] profiling newb

Nathan Nobbe wrote:
> all,
>
> i am just getting my feet wet w/ profiling.
> its nice to see i can invoke a page from the browser then
> see an analysis in kcachegrind using xdebug to generate the data.
> however, im curious about 'finding the weak spots in an application'.
> say for instance i arrive at a new location as a consultant or w/e;
> point is assume a totally foreign codebase that needs to be
> optimized. theoretically 'profiling' would be a way to analyze the
> application and determine where the slow points are, which methods
> are getting called repeatedly and so forth. then those areas could be
> analyzed for potential gains.
> it seems to me though, that since generating a series of cache files
> is a manual process and the analysis a manual process it would take
> a long time just to profile an application. so someone familiar with
> said application could point out the slow spots much more quickly
> than a person using a profiling tool.
> is there a tool that can analyze a large number of cache files and give
> some sort of comprehensive report? it seems very natural to have cache
> files get generated in a pre-production site for analysis. if they could be
> sent through something that generated a comprehensive report that would
> really reduce profiling time rather than having to look through them one at
> a time.


While code optimization/checking is definitely something that needs
attention, personally I'd look at the database side of things first.

If you're using a database wrapper of some sort, see if there are any
logging options (ideally one that logs both the query & the time it took
to run). Missing indexes or bad queries will slow things down a lot
quicker than changing a foreach loop to a while loop.

Alternatively make sure your database has logging enabled and look at
that instead (hopefully in a limited environment so you don't have 50
people hitting different apps all at the same time).

I'm not sure if xdebug can take that sort of stuff into account when it
generates the times.

After that, definitely look at the code. Write a script to summarize the
xdebug output files and generate a report (I'd do it in perl myself but
YMMV).

--
Postgresql & php tutorials
http://www.designmagick.com/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h23.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10257 seconds with 10 queries