Edwin Leuven schrieb:
the following is the profile i get when opening the user guide:
(full profile here: http://leuven.ecodip.net/lyx/profile.zip)
was wondering why lyx::Changes::set(lyx::Change const&, int, int)
is called...
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
10.00 0.03 0.03 183891 0.00 0.00
lyx::Changes::set(lyx::Change const&, int, int)
3.33 0.11 0.01 181982 0.00 0.00
lyx::Paragraph::Pimpl::insertChar(int, wchar_t, lyx::Change const&)
Every time you insert a character, the corresponding change has to be
set (even if it is unchanged, because it may be inserted in a region of
deleted/inserted text).
For doc loading, this mechanism can be optimized. However, I like the
sound approach that we have presently. Is 10% a critical factor?
Michael