Martin Vermeer a écrit :
On Sat, Apr 01, 2006 at 09:18:42AM +0200, Abdelrazak Younes wrote:
Abdelrazak Younes a écrit :

...
The bad news is that the slowness came back... :-(
This means that the culprit is somewhere in setCounter. This method looks awfully complicated to me and I think I will just stop searching for now as I guess my eventual contribution would not even be considered.

Looking at the setCounter and updateCounters code...

what about short-circuiting execution of setCounter if the paragraph
has no label? I.e. labeltype == LABEL_NO_LABEL. You could do that
by returning from setLabel at the start for a labelless paragraph. I
think it would be harmless.
I am not sure I understand what you propose because I cannot find the setLabel method, is it
"InsetCollapsable::setLabel(std::string const & l)"?

I have put this inside setCounter:

+    // is it a layout that has no label at all (ex: standard layout)?
+    if (layout->labeltype == LABEL_NO_LABEL)
+       return;

    // is it a layout that has an automatic label?
    if (layout->labeltype == LABEL_COUNTER) {

... but this doesn't seem to help.

After all, in a typical document, standard paragraphs are the vast
majority.
Won't this pose problem if the paragraph has a depth different from 0?

Thanks for the help,
Abdel.

Reply via email to