Page 1 of 1

[Information only] Updating file size differences

Posted: Sat May 17, 2014 3:18 am
by kingfisher
I am posting this as information ; I don't expect there to be a solution.

I noticed that file sizes were increased dramatically when updated by LO so I conducted a test by creating duplicates of two files which are updated using a series of macros and data from a .csv file. The results are as follows :

File 1 ( a spreadsheet ) and a copy were each 97.7KiB prior to update. When the original file was updated by OpenOffice, it grew in size to 98.0KiB. When the copy was updated by LO, it grew to 146.3KiB.

File 2 ( a spreadsheet ) and a copy were each 169.4KiB prior to update. When the original was updated by OpenOffice, it grew to 169.9KiB. When the copy was updated by LO, it grew to 206.9KiB.

Re: [Information only] Updating file size differences

Posted: Sat May 17, 2014 2:39 pm
by acknak
Maybe a font?

I believe LO is able to embed fonts; I don't know if it will do so by default, without you asking it to do so.

Re: [Information only] Updating file size differences

Posted: Mon May 19, 2014 2:44 am
by kingfisher
Thanks, acknak. I followed that up, found and checked the following link :

Is font embedding in LO 4.1 automatic, or must I enable/select it?
Font embedding is not automatic. Go to File > Properties, click on the Font tab and check the box that says 'Embed fonts in the document'. This seems to be a per document preference.
I only checked one of the files updated and font embedding is NOT selected.

Re: [Information only] Updating file size differences

Posted: Mon May 19, 2014 6:16 pm
by acknak
Good to know--thanks for checking.

If you have two versions of the same file, you can always compare a file size listing from any zip utility. That should make it clear where the extra size is coming from.

Re: [Information only] Updating file size differences

Posted: Wed May 21, 2014 3:52 am
by kingfisher
Thanks again. The same thought occurred to me. These are the results :

Code: Select all

$ pwd                          $ pwd
/data/backups/user/LOupdate    /data/backups/user/OOupdate
$ du -a --max-depth=1 -h       $ du -a --max-depth=1 -h
4.0K ./meta.xml				    4.0K ./meta.xml
4.0K ./mimetype				    4.0K ./mimetype
4.0K ./manifest.rdf	
0 ./current.xml				    0 ./current.xml
2.8M ./content.xml             2.3M ./content.xml
4.0K ./manifest.xml			   4.0K ./manifest.xml
52K ./thumbnail.png			   12K ./thumbnail.png
8.0K ./settings.xml            8.0K ./settings.xml
60K ./styles.xml				   60K ./styles.xml
2.9M                           2.4M	
I can't highlight items posted as code. The points of difference are :

1. The file manifest.rdf is NOT present in the OO version.
2. The file content.xml is larger in the LO version.
3. The file thumbnail.png is larger in the LO version.

Re: [Information only] Updating file size differences

Posted: Wed May 21, 2014 4:44 am
by acknak
Interesting--I wonder what it means ;-)

du isn't the most precise way to check the sizes: it reports the number of disk blocks used for the file and not the exact size. Not really important here, as far as I can see.

unzip will tell the exact sizes, compressed and inflated.

Looks like most of the difference is in the larger content.xml.

I know LO includes some formatting in the xml code that OO does not (indents, line breaks) but when I've checked, that contributes at most a few percent to the file size. This looks more like a 20% increase.

Re: [Information only] Updating file size differences

Posted: Wed May 21, 2014 6:31 am
by kingfisher
Thanks. I have never used unzip. I hope I have used the correct parameters. I have pasted the results in pastebin.