Daniel Carrera wrote:
Joerg Barfurth wrote:

Take a look at Tools-Options-Load/Save-General. There is an option 'optimize XML for size'. This option defaults to 'optimize' and iirc it was introduced in an early effort to make the file load process faster.

I'd assume that the effect of this on compressed size is limited, but certainly does affect uncompressed size.

This suggests that uncompressed XML size does have a measurable effect.


It'd be interesting to find out why they added that option. Whether it speeds parsing, or to improve the file size on-disk, or if (as you suggest) is to reduce the size on memmory.


Huh? What do you think I suggest?

I meant to say it affects the size of the uncompressed file contents (before parsing). So I'd say the main effect on process resources is added time to handle and parse these ignorable extra bytes. I don't think it would have any effect on long-term memory usage.

IIRC this option was added to speed up document loading. Any such effect would have to occur in the read-uncompress-parse parts of this process rather than the document building, as the whitespace is completely irrelevant for the latter. I strongly suspect that the main effect (if any) of this would be in the 'parse' stage, as the white space should compress rather well and uncompress rather quickly.

And that also suggests a more relvant experiment than stopping at byte counts and speculating whether or not they have a significant effect: Take the same (big) document saved with and without pretty-printing, compare their sizes and measuring the load times.


Assuming that removing the white space does not provide speed gains that are unrelated to the file size.


What gains could that be? The XML infoset essentially remains the same, with or without that whitespace. After the XML parser stage no trace of it remains in the in-memory model. The only difference is in size - and the size of the uncompressed stream will probably be more significant here than compressed, on-disk size. But both these sizes are covered by 'related to file size'.

Ciao, Joerg

--
Joerg Barfurth              Sun Microsystems - Desktop - Hamburg
>>>>>>>>>>>>>>>>>> using std::disclaimer <<<<<<<<<<<<<<<<<<<<<<<
Software Engineer                         [EMAIL PROTECTED]
OpenOffice.org Configuration          http://util.openoffice.org


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

Reply via email to