On Thu, Mar 28, 2002 at 11:09:51AM +0100, Jean-Marc Lasgouttes wrote: > Don't bother with it. generating this does not cost anything. The only > proble is with the various TOCS, I think (although I'd like to have > hard numbers on a large file: how much does TOC generation cost?).
It is not really a matter of performance, but of technical implementation. I wouldn't feel particularly happy about implementing a class derived from QPopupMenu that fills it up during an overridden show(). It might work but I don't think it's a robust technique (as it's definitely unusual, we could expect it to break with various qt versions ...) > If menubackend where to cache the TOCS, using some signal, would > regenerating the menus at each Menu::update() really cost too much? > The time will depend on the number of headings, not number of > paragraphs in document. When does Menu::update() get called exactly ? If this works with a reasonable "frequency", i.e. we can avoid the update-on-menu-open behaviour, then I'm happy. regards john -- "I never understood what's so hard about picking a unique first and last name - and not going beyond the 6 character limit." - Toon Moene