Jean-Marc Lasgouttes wrote:
"Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes:

Bennett> One more bit of information that might be useful: Shark can
Bennett> show the amount of time specific lines of code use. Here is
Bennett> what it shows in the relevant bit of QLPainter.C:

Abdel, this shows that metrics computation is still very expensive on
mac. We might have to revise the policy of returning the width from
paint operation. Am I right that Painter::text should _either_ draw
text _or_ compute width? Are there cases where we need both?

I think there is single case in rowpainter that do both. I half expected performance degradation on Mac (and I said that at the time) but I wanted to be sure before taking any action. My plan was to change the width() calculation in QLPainter::text() to use theFontMetrics() instead if it shows as a problem on Mac. It is apparently, I'll do the change.

Also, we can probably use something better than a map (I'm sure qt has
nice hash tables) to store metrics.

Or Andre's vector solution. I'll check it out.

Abdel.

Reply via email to