Edwin Leuven wrote:
Edwin Leuven wrote:
Michael Gerz wrote:
With optimizations or in debugging mode?

aargh! it is compiling with --enable-optimization=-O2 now. will report

What's that? A CMake settings? Or is this linux with oprofile?


opening and saving the userguide takes about 1 sec

opening profile:

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
10.34 0.03 0.03 24962 0.00 0.00 lyx::LyXLex::Pimpl::nextToken()
  6.90      0.05     0.02   183891     0.00     0.00  lyx::Changes::merge()


saving profile:

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
35.43 0.79 0.79 2002198 0.00 0.00 lyx::Paragraph::getFontSettings(lyx::BufferParams const&, int) const

Ouch, 35%! I am sure this could be optimized!


21.52 1.27 0.48 1963236 0.00 0.00 std::vector<char, std::allocator<char> >::_M_insert_aux(__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > >, char const&)

This too by preallocating the memory by calling reserve(), one needs to review all std::vector uses.


18.39 1.68 0.41 2023687 0.00 0.00 lyx::Changes::lookup(int) const


(full profiles here: http://leuven.ecodip.net/lyx/profile.zip)


Reply via email to