Abdelrazak Younes wrote: > Peter Kümmel wrote: >> Abdelrazak Younes wrote: >>> >> Here some numbers, msvc/Release: when crss eats 100 seconds lyx only >> needs 32 seconds (cpu-time in the tsak manager). If these 100 sec are >> really wasted by lyxerr, the we waste 75% of the cpu time for nothing. > > While it would be nice if someone steps up and implement JMarc' Macro > based optimisation for lyxerr, I am pretty sure that lyxerr is not > responsible for the slowness here. > > Here is my theory, following Georg and JMarc suggestions and my own > investigation: > > I think that DocIterator is the culprit here. The fact that mathed uses > a lot insets (especially in this test file!) is just a show case. Now, I > still don't understand very well how csrss.exe enters the loop here.
I've found this searching the Platform SDK: "Now we can see the reasons for the context switches. Solitaire is calling CSRSS constantly, and most of the time is spent in CSRSS running a single thread. The processor is not spending a great deal of time running the Solitaire program. It would appear that Windows NT that has the problem. By using the WAP profiling tool, no longer included with the Platform SDK, we discovered that Solitaire was making a lot of calls to the GetPixel and SetPixel functions." Maybe Qt calls csrss. > Another show case for DocIterator slowness: > 1) Copy and paste the contents of UserGuide 4 or 5 times. > 2) Break a section > 3) Wait... > > This is because the section numbering code is another big user of the > DocIterator class. > > Abdel. > > > > > -- Peter Kümmel