Jean-Marc Lasgouttes a écrit :
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
But eraseIntern is only called when removing characters from a
paragraph, right?
Abdelrazak> You are right of course. My use case is to type "Enter" in
Abdelrazak> the middle of the paragraph of a big document (Extended or
Abdelrazak> UserGuide) thus cutting this paragraph in two. In this
Abdelrazak> case eraseIntern _is_ the bottleneck.
OK. I guess the problem is that eraseIntern does one character at a
time instead of erasing a block. This means that the paragraph data is
copied multiple times too. However I am surprised that this has a
noticeable effect. How long are your paragraphs?
The effect is the same for any paragraph inside "Extended.lyx", but it
seems that I was mis leaded by my debug info, sorry for the noise.
Actually I think that it is the instructions just after eraseInter that
are guilty:
if (pos) {
// Make sure that we keep the language when
// breaking paragrpah.
if (tmp->empty()) {
LyXFont changed = tmp->getFirstFontSettings(bparams);
LyXFont old = par.getFontSettings(bparams, par.size());
changed.setLanguage(old.language());
tmp->setFont(0, changed);
}
return;
}
Does it make more sense?
Can you have access to a profiler?
Abdelrazak> If you know something that works with mingw, I will be
Abdelrazak> happy to use that. Right now, I am profiling by putting
Abdelrazak> debug info.
I use gprof with gcc. You should configure with --enable-profiling
--disable-stdlib-debug --disable-assertions and recompile.
BTW, do you use --disable-stdlib-debug?
I don't remember! I cannot configure since the automake changes plus I
don't want to mess up my the Makefile that I have modified for the qt4
frontend. A typical gcc call is:
g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -Wextra -Wall
-I/d/program/Aspell-0.60.4/include -fno-exceptions -Os -mms-
bitfields -MT paragraph_funcs.o -MD -MP -MF ".deps/paragraph_funcs.Tpo"
-c -o paragraph_funcs.o paragraph_funcs.C
So I guess it is the same as --disable-stdlib-debug ? Do you know what
-mms-bitfields is for?
I am going to recompile everything in case if there are still some debug
info in my build.
Thanks for the help,
Abdel.