Philipp Reichmuth wrote: >>> What forbid us from loading the bitmaps all at once when they are >>> generated? Will it be very slow or very memory consuming? If this is not >>> possible, can we use bitmaps directly when displaying a new page instead >>> of drawing lyx formulas and then replace them with bitmaps? > > KB> If you would have hundreds of formulas , you would know the answer. > KB> Having a slower processor is a pain on startup. > > Would it be possible to generate bitmaps ahead while the user does > nothing, just to utilize idle periods? >
Sorry for bringing up again this old thread (I wasn't paying attention :). I also find the current behaviour also somewhat annoying. I think that there is some misunderstanding, and I'd like to contribute to it :) This is more or less what I understand from reading the code and doing a bit of experimentation. Please correct me if I'm wrong. 1) Right now all previews are converted to ppm on a first shot at startup (including latex, dvips and ps->ppm), in non-blocking mode (you can type while it's doing it). This is obviously the most time-consuming operation. Then these bitmaps (which can be loaded natively by both frontends) are loaded un screeful at a time, this time in blocking mode. 2) On my 1Ghz i686 the loading operation of all snippets is aceptable (like 10 sec), on a normal-sized document (35 pages) with lots of formulas. Of course, on a large book it can be annoyingly worse. I've checked this by removing the check for heigh < bv_height on for (int height = 0; row && height < bv_height; row = row->next()) { On getVisibleParagraphs, located on graphics/GraphicsSupport.C Maybe an easy way to improve things would be to load more than one screenful at a time (say two or more). I suppose that this can be achieved by adding a look-ahead factor F, somethig like for (int height = 0; row && height < F*bv_height; row = row->next()) Does this makes sense? 3) I don't know if a smarter way of loading bitmaps (like the one suggested by Andrè) would improve things that much: bitmap loading is still "blocking"... I think that the ultimate solution is still to make it non-blocking, i.e. to load on idle time, like Bo Peng suggested. Sorry if I've misunderstood everything... Bye, Alfredo