![]() |
|
|
So you want to know why something is slow?
I've just checked in a relatively easy to use gmon/gprof based profiler into the tree. You can start the profiler, stop the profiler, reset the profiler, etc... right from your very own browser, or editor, or mail/news,...... (there is a menu based interface to the profiler under the Help menu). The best part is you can get a HTML profile report printed into your browser! I've attached a sample. It's the top 100 functions that are exercised during startup. The report shows the time spent in each function, sorted from highest to lowest. It also shows the executation "arcs" - foo called bar called zoo, and we did this 30% of the time. I'll be writing up more detailed info, but for now, if you want to try it:
With the profiler running there is slight performance slowdown (maybe 5-10%). By default, the profiler is running at startup. You can set the initial state to off using:
An optimized build (with DEBUG not set) will give you the most accurate data, but you can build MOZILLA_GPROF and -g just fine. It'll run just a little slower. mcafee@netscape.com
|
||||||||
| Copyright © 1998 The Mozilla Organization. | |||||||||