Edwin Leuven schrieb:
Michael Gerz wrote:
Edwin,

could you please check whether the attached patch saves any time in lyx::Changes::lookup(int) const and lyx::Changes::merge() during opening/saving a file?

this is open (save below):

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
7.41 0.02 0.02 268500 0.00 0.00 lyx::InsetBase::inMathed() const 7.41 0.04 0.02 10948 0.00 0.00 lyx::support::compare_no_case(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) 3.70 0.05 0.01 236382 0.00 0.00 lyx::operator==(lyx::LyXKeySym const&, lyx::LyXKeySym const&)

and this save:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
17.07 0.21 0.21 15272 0.01 0.06 lyx::Paragraph::write(lyx::Buffer const&, std::ostream&, lyx::BufferParams const&, unsigned int&) const 9.76 0.33 0.12 1456198 0.00 0.00 lyx::Paragraph::getFontSettings(lyx::BufferParams const&, int) const 8.94 0.44 0.11 1427808 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&) 7.32 0.53 0.09 1437719 0.00 0.00 std::vector<char, std::allocator<char> > lyx::(anonymous namespace)::iconv_convert<char, wchar_t>(lyx::IconvProcessor&, wchar_t const*, unsigned int) 5.69 0.60 0.07 1638988 0.00 0.00 lyx::operator==(lyx::LyXFont::FontBits const&, lyx::LyXFont::FontBits const&)

In other words: The speed-up is signficant, right?

Michael

Reply via email to