[Information only] Updating file size differences

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

[Information only] Updating file size differences

Post 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.
Apache OpenOffice 4.1.9 on Linux
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Information only] Updating file size differences

Post 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.
AOO4/LO5 • Linux • Fedora 23
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: [Information only] Updating file size differences

Post 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.
Apache OpenOffice 4.1.9 on Linux
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Information only] Updating file size differences

Post 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.
AOO4/LO5 • Linux • Fedora 23
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: [Information only] Updating file size differences

Post 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.
Apache OpenOffice 4.1.9 on Linux
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Information only] Updating file size differences

Post 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.
AOO4/LO5 • Linux • Fedora 23
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: [Information only] Updating file size differences

Post by kingfisher »

Thanks. I have never used unzip. I hope I have used the correct parameters. I have pasted the results in pastebin.
Apache OpenOffice 4.1.9 on Linux
Post Reply