boost and zlib

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: boost and zlib

#16 Post by Geoff the Medio »

tezeriusz wrote:ZLIB XML with streambuf - iterations:10000
time1 = 14568
filesize1 = 727
[...]
UNCOMP bin w/o streambuf - iterations:10000
time6 = 4771
filesize6 = 510
What is the difference between "with streambuf" and "w/o streambuf", and what happens if you do binary serialization with zlib or gzip compression?

User avatar
tezeriusz
Space Squid
Posts: 75
Joined: Mon May 24, 2010 10:22 am
Location: Poland

Re: boost and zlib

#17 Post by tezeriusz »

streambuf precisely filtering_streambuf is needed by that compression filters. I wanted to check how it will affect cpu usage.
UNCOMP XML with streambuf - iterations:10000
time0 = 11640
filesize0 = 3698
ZLIB XML with streambuf - iterations:10000
time1 = 16298
filesize1 = 734
GZIP XML with streambuf - iterations:10000
time2 = 17183
filesize2 = 746
BZ2 XML with streambuf - iterations:10000
time3 = 25793
filesize3 = 808
UNCOMP XML w/o streambuf - iterations:10000
time5 = 9624
filesize5 = 3698
UNCOMP bin w/o streambuf - iterations:10000
time6 = 4742
filesize6 = 510
ZLIB BIN with streambuf - iterations:10000
time7 = 7334
filesize7 = 293
GZIP BIN with streambuf - iterations:10000
time8 = 7957
filesize8 = 305
BZ2 BIN with streambuf - iterations:10000
time9 = 10656
filesize9 = 329

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: boost and zlib

#18 Post by Geoff the Medio »

tezeriusz wrote:UNCOMP bin w/o streambuf - iterations:10000
time6 = 4742
filesize6 = 510
ZLIB BIN with streambuf - iterations:10000
time7 = 7334
filesize7 = 293
What are the units of time and file size? (ms per 10000 iterations and kB per file?)

User avatar
tezeriusz
Space Squid
Posts: 75
Joined: Mon May 24, 2010 10:22 am
Location: Poland

Re: boost and zlib

#19 Post by tezeriusz »

ms per test with is 10000 iterations with compression and decompression from file and with serialization and deserialization and with result test check every iteration. File size is in bytes.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: boost and zlib

#20 Post by Geoff the Medio »

tezeriusz wrote:File size is in bytes.
Those are pretty small files then... FreeOrion XML save files often end up being several MB. It might be worth trying again with some larger files...?

User avatar
tezeriusz
Space Squid
Posts: 75
Joined: Mon May 24, 2010 10:22 am
Location: Poland

Re: boost and zlib

#21 Post by tezeriusz »

no, we do not need larger files. Lets use something that google translator translate as proportions ;]
3698/510 uncompress xml/binary, so save file size(xml) need to be multiple by ~0.1379 and we will got size after conversion to binary from xml. Time is little bit tricky but we can use that same trick to determine results(almost), and of course we can use this to determine best compress method. Do you want that test to check/modify them? They are ugly!

User avatar
tezeriusz
Space Squid
Posts: 75
Joined: Mon May 24, 2010 10:22 am
Location: Poland

Re: boost and zlib

#22 Post by tezeriusz »

Ok this shows that there is no point in compression if we can use binary serialization output.
The question is what to do next?;] any small task for newb?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: boost and zlib

#23 Post by Geoff the Medio »

tezeriusz wrote:The question is what to do next?;] any small task for newb?
See: viewtopic.php?f=9&t=4754

Post Reply