On Jun 10, 2005, at 10:56 AM, Jean-Marc Lasgouttes wrote:

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

Jean-Marc> The following patch reduces the number of calls to getFont
Jean-Marc> by the two following means:

Jean-Marc> For your enjoyment, I also attach the patch that removes
Jean-Marc> font metrics caching for qt, which I think is also
Jean-Marc> relevant.

The two patches are now applied. Bennett, you said at the time that
the fontcache patch make things worse. If this is still true, I can
keep the fontcache for qt/mac.

It does feel slower. These are the results I'm now getting with Shark's time profile (granularity set at source line), starting at the point when times as a percentage of the total really start dropping.

...
| + 99.1% main.C:49 (LyX)
| | + 98.8% lyxfont.C:973 (LyX)
| | | + 98.7% lyxfont.C:973 (LyX)
| | | | + 86.8% counters.C:343 (LyX)
| | | | | + 86.8% qtTimeout.C:59 (LyX)
| | | | | | + 86.8% math_atom.C:49 (LyX)
| | | | | | | + 86.8% texrow.C:85 (LyX)
| | | | | | | | + 86.3% main.C:49 (LyX)
| | | | | | | | | + 86.3% main.C:49 (LyX)
| | | | | | | | | | + 74.2% Timeout.C:71 (LyX)
| | | | | | | | | | | + 74.2% SpellBase.C:49 (LyX)
| | | | | | | | | | | | + 62.4% SpellBase.C:49 (LyX)
| | | | | | | | | | | | | + 62.3% SpellBase.C:49 (LyX)
| | | | | | | | | | | | | | + 60.1% SpellBase.C:49 (LyX)
| | | | | | | | | | | | | | | + 55.5% SpellBase.C:49 (LyX)
| | | | | | | | | | | | | | | | + 37.7% QtView_moc.C:102 (LyX)
| | | | | | | | | | | | | | | | | + 37.7% QtView_moc.C:102 (LyX)
| | | | | | | | | | | | | | | | | | + 35.1% lengthcombo.C:62 (LyX)
| | | | | | | | | | | | | | | | | | | + 33.7% lengthcombo.C:62 (LyX)
| | | | | | | | | | | | | | | | | | | | + 33.1% lengthcombo.C:62 (LyX)
| | | | | | | | | | | | | | | | | | | | | + 0.4% lengthcombo.C:62 (LyX)
| | | | | | | | | | | | | | | | | | | | | | 0.0% lengthcombo.C:62 (LyX) | | | | | | | | | | | | | | | | | | | | | | 0.0% qt_helpers.C:205 (LyX) | | | | | | | | | | | | | | | | | | | | | 0.1% shared_count.hpp:269 (LyX)
| | | | | | | | | | | | | | | | | | | | | + 0.1% qt_helpers.C:205 (LyX)
| | | | | | | | | | | | | | | | | | | | | |   0.0% stl_alloc.h:677 (LyX)
| | | | | | | | | | | | | | | | | | | | 0.1% lengthcombo_moc.C:131 (LyX)
| | | | | | | | | | | | | | | | | | | |   0.0% qt_helpers.C:205 (LyX)
...

But, frankly, the difference in speed introduced with the fontcache patch is trivial compared to the slowness of lyx-140 overall: it really is unusable on the Mac, and something else must account for the slowness.

I'd love to help fix this, but I need guidance. Apparently Shark's profiling -- as I'm doing it, at least -- isn't providing the needed data. If there is another tool I should use that others are more familiar with, let me know, and I'll do what I can. (gprof, e.g., is already on my machine.)

Bennett

Reply via email to