On Friday 28 June 2002 10:38 am, Andre Poenitz wrote:
> On Fri, Jun 28, 2002 at 10:08:14AM +0100, Angus Leeming wrote:
> > I don't think that's correct. Strictly speaking, loading stalls until you
> > have started off all the conversion processes.
>
> Why is that?
>
> Can't we have something like a "qun queue" and put things just there and
> have _everything_ done asynchrounously?

Sure. Sounds like a great idea, but at the moment it's vapourware.

> > Run "./lyx -dbg graphics" to
> > see how much work does into that when you have, say, 100 equations.
>
> I'll have a look.
>
> > Thereafter, these conversions occur asynchronously and the images are
> > loaded as and when they become availiable.
> >
> > In InsetGraphics, I do not startLoading() until the inset recieves a draw
> > request. Perhaps you could use a similar approach?
>
> Bad idea. Konni was already complaining about that features for graphics.
> In old LyX you had just to wait some time and were sure that everything was
> loaded. Now you can't even scroll anymore through a document without the
> cursor jumping around unpredictably.

Well that's just a bad implementation (the cursor jumping around). 

If you really want to load all graphics on start-up then define a lyxrc 
varaible to be used so: 

void InsetGraphics::Cache::update(string const & file_with_path)
{
        lyx::Assert(!file_with_path.empty());

        string const path = OnlyPath(file_with_path);
        loader.reset(file_with_path, parent_.params().as_grfxParams(path));
+
+       if (lyxrc.loadImagesImmediately && 
+          loader->status() == grfx::WaitingToLoad)
+               loader->startLoading();
}

> > Alternatively, perhaps we should think of setting off a single forked
> > process that will result in multiple image files when loading the
> > document. This is definitely possible in the case of the mathed preview I
> > believe and is essentially what David was suggesting by using
> > preview.sty.
>
> Actually I want it mainly for the real graphics, because that's where it
> is really needed. I don't care too much for the preview gimmick.

There is no load up penalty with the graphics inset as I understand it 
because we don't startLoading() until a draw request is received. It's 
unlikely to be much of a penalty if you implemented the above little snippet 
anyway because most documents don't have hundreds of images. Why not suck it 
and see?

Have you any concrete ideas about your "qun queue"? 

Angus

Reply via email to