On Nov 22, 2007, at 5:23 AM, Craig Ringer wrote:
>> Current issues are:
>> - We read all objects from a sream immediately into memory (I
>> think this is
>> ok, because we have to decompress the stream only once)
>
> That does land up being wasteful if nothing in that stream is
> called for.
>
> It'd be interesting to load the stream only when the first object
> in the
> stream is required.
>
Reading the stream into memory and loading all the objects is fine,
but if possible, wait till the first object request into the stream
to load it. You will find that object streams will get more and
more use from Adobe-created PDFs. So the better PoDoFo's
implementation....
> For that matter, I even wonder about only reading objects from the
> stream up to the one that is required, but retaining the open file
> stream, filter stack, etc so we can read more from it when needed.
MUCH too complex and doesn't gain you enough.
>> -Another point is that the object containing the stream currently
>> stays in
>> memory after we read. I think it could even be deleted savely. It
>> should not
>> be referenced from anywhere else.
>
> I assumed the actual stream data would have practically no cost, since
> it'd be a PdfObject with a file-backed stream, and we'd be reading
> from
> that stream using stream-oriented filters. If that's not the case,
> then
> I definitely need to look into options there.
>
Yes, we definitely want to keep it out of memory after we're done
with it. Using a file-backed stream would be a good solution - and
another point towards boost's file streams which enable "partial
streams"...
Leonard
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users