Bennett Helm wrote:
[To the list this time!]

On May 25, 2006, at 5:31 PM, Abdelrazak Younes wrote:

Bennett Helm wrote:
This profile was generated by simply typing into the middle of a large document for 30 seconds.

I see that there is a lot of improvement compared to your former profile WRT qt4 frontends. Do you feel the improve in speed?

A bit: I type a sentence and have to wait 10 seconds instead of 15 for it to catch up.
Hey man, this is a 33% improvement!
I have enabled the width cache now so maybe we'll see another 33%... then yes another 33% and were done ;-)

AFAICS the clear culprit is again font_metrics::width(). This is true for your first three patches (typing and scrolling with down keys). But I really don't understand where the time is spent inside this method (it is not shown in the deeper profile results):

 + 6371.2 ms font_metrics::width(char, LyXFont const&) (lyx)
 |   1.0 ms LaTeX::deplog(DepTable&) (lyx)
| - 10.1 ms font_metrics::width(char const*, unsigned long, LyXFont const&) (lyx)

Does that mean that "font_metrics::width(char const*,...)" is using 10.1 less time than its parent "font_metrics::width(char, LyXFont const&)"? IOW, is it to say that "- 10.1 ms" is the same as + 6361.1 ms" ?
Then why is there no deeper results for it?

I'm selectively editing the report -- cutting out anything that takes < 50ms or so on the assumption that we're not going to get significant improvements looking there right now. If you want the full report, I can post it. (It's big.)
I am not really interested in the full report but only in everything that is deeper than the first font_metrics::width(char, LyXFont const&). If it is too time consuming to cut down the report could you please send it to me if it's less than 5Megs?


Nonetheless, the report Shark.app generates for some reason shows only how much time the tree takes up rather than the individual processes within the tree. (I hope I'm using the proper language here.) The "+" indicates that I've expanded the branch of the tree, whereas the "-" indicates that I've collapsed it. So in the above example, 6360ms is used by the first font_metrics, 1ms by LaTeX, and 10.1 by the second font_metrics (and everything beneath it in the tree).
This doesn't make sense...
font_metrics::width(char, LyXFont const&) is just a wrapper around the second:

   /// return the width of the char in the font
   inline int width(lyx::char_type c, LyXFont const & f) {
       return width(&c, 1, f);
   }

Abdel.


I'll send a screen shot for the next profile.

Bennett




Reply via email to