Hi Thorsten,
    
----- Original Message ----- 
From: "Thorsten Behrens" <[EMAIL PROTECTED]>
Newsgroups: openoffice.dev
To: <dev@openoffice.org>
Sent: Tuesday, May 17, 2005 5:38 PM
Subject: Re: [dev] question about improving the speed of openning .ppt file


> "jiangdongjin" <[EMAIL PROTECTED]> writes:
> 
> >  To my opinion, OOo impress opens .ppt file slower because of:
> >  1. It imports all contents before displays, but MS Powerpoint only
> >     imports those needed;
> >  2. It create too many temp files for those pictures embeded in
> >     slide pages, but MS Powerpoint do nothing about this.
> >  
> Hi jiangdongjin,
> 
> as you've found out by yourself, not streaming out the images to temp
> files hogs huge amounts of memory (and is therefore not an
> option). 
> 
> Your first item is actually the crucial point here: as our PPT import
> is just that, an import, we really have to fully read the file
> content. This is because our own, internal representation of the
> document content (the 'model') must be complete before anything can be
> displayed. There are currently no mechanisms to lazy-load only the
> first slide, and the remainder only on demand.
> 

As I mentioned :
OOo impress imports all contents before displays, but MS Powerpoint only 
imports those needed;

I have tried to change the synchronous load mechanism but I failed :)
So many things I need to know and change. 

I found when open my test .ppt file(contains many jpg or bmp pictures), the 
most time-wasted points are those functions to load picture.
i.e.
    ImportGIF(...)
    ImportPNG(...)
    ImportJPEG(...)
    ImportXBM(...)
    ......
If I omit these functions, My test .ppt file opened as fast as MS 
Powerpoint(maybe 1-2 seconds slower), but all my pictures are missing.
So my plan is, in the load phase, I only load some basic infomation like width 
and height of the picture(I think only these are necessary for formatting), 
then display.After that if I really need some pictures(display or operation), I 
import it from input stream.

Is my method feasible? Thanks!

best regards,
jiangdongjin

Reply via email to