>>>>> "EP" == Evenblij, Paul <[EMAIL PROTECTED]> writes:

EP> Right, I had been thinking along those lines as well, but am not
EP> familiar enough with the code to be able to tell if this is worth
EP> pursuing. 

    I woudln't have suggested it if I didn't think it was worth while.

EP> At first I thought it would be pretty memory-intensive to keep all
EP> those images in memory, but then I realized that is what you do
EP> anyway, since you first create the DOM tree. (In my version
EP> everything was written to output immediately:) In fact, being able
EP> to tell if you already have the image data will even reduce memory
EP> usage.

    Correct for the Base64Encoder, I believe the JPEG/PNG encoder does
not keep the images in memory but writes them to disk.  However in
this case you could easily reopen the disk files and byte compare
them.  So virtually all cases the caching is a big improvement, with
little or no downside.

EP> -----Original Message----- From: Thomas E Deweese
EP> [mailto:[EMAIL PROTECTED]] Vincent makes some good points
EP> about the general case, however I will add one additional comment
EP> which is that computing a checksum on the encoded data should be
EP> significantly cheaper than the encoding processes it's self (so
EP> you could encode the data, check if the checksum matches (BTW the
EP> PNG encoder has a CRC generator) a pre-existing image, check the
EP> encoded data byte by byte, just to be sure, if everything checks
EP> out just use a reference).

EP>    This is a quite a bit more work (and quite a bit slower) but
EP> would be usable for the general case.  For now just having a
EP> simple minded version (that might eventually grow into a general
EP> solution with options) would be great though.


EP> ---------------------------------------------------------------------
EP> To unsubscribe, e-mail: [EMAIL PROTECTED] For
EP> additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to