Raised This Month: $51 Target: $400
 12% 

When is it worthwhile to bz2 a file?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
robotortoise
Senior Member
Join Date: Nov 2013
Old 06-19-2014 , 01:10   When is it worthwhile to bz2 a file?
Reply With Quote #1

So I run a TF2 server with a lot of custom content that needs to be downloaded. (Models, sound, ect.)

Usually I'd just bz2 compress everything, though recently it became apparent through another thread that sometimes it's detrimental to compress files, as the client has to then DECOMPRESS them, and it really doesn't save any time.

My question is, at what file size does compression become worthy? 3MB? 4MB? 200 KB?


And will it actually speed up the process on the client's side if I don't compress, say, all of my .mdl files? (which are a few kb)

There was no thread with any tests or anything done on it that I could find via search, so I'd appreciate if someone could help me out with this.

-Robotortoise [Palutena's Bro]
robotortoise is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 06-19-2014 , 01:22   Re: When is it worthwhile to bz2 a file?
Reply With Quote #2

I can't see how it would take to much time to uncompress... I guess your in a battle between network or cpu io - so if you have good network speed I wouldn't worrie to much about little mdls. I myself would not even waste time unless it was a huge map 50+Mb
hamilton5 is offline
Ade
I love purple
Join Date: May 2010
Old 06-19-2014 , 03:20   Re: When is it worthwhile to bz2 a file?
Reply With Quote #3

the time it took u to write that post after already asking in that thread what would be the threshold.. would've been better spent on you actually doing the tests you inquire about
__________________
Ade is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-19-2014 , 06:26   Re: When is it worthwhile to bz2 a file?
Reply With Quote #4

Compress everything, the time taken to do the extra request is going to take longer than decompression.
__________________
asherkin is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 06-19-2014 , 09:58   Re: When is it worthwhile to bz2 a file?
Reply With Quote #5

Quote:
the time taken to do the extra request
all servers wait for an ok on the bz request before sending out the 2nd?

Last edited by hamilton5; 06-19-2014 at 09:59.
hamilton5 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-19-2014 , 10:17   Re: When is it worthwhile to bz2 a file?
Reply With Quote #6

Quote:
Originally Posted by hamilton5 View Post
all servers wait for an ok on the bz request before sending out the 2nd?
The client always asks for the bz2 version first and since FastDL is HTTP, it has to wait for the 404 NOT FOUND (or timeout) before switching to the non-bz2.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-19-2014 at 10:18.
Powerlord is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 06-19-2014 , 10:50   Re: When is it worthwhile to bz2 a file?
Reply With Quote #7

duh the client, thanks. seems to happen so fast I assumed it automatically just sent out both. that makes sence tho.. robotortoise all your threads r belong to me
hamilton5 is offline
robotortoise
Senior Member
Join Date: Nov 2013
Old 06-19-2014 , 16:27   Re: When is it worthwhile to bz2 a file?
Reply With Quote #8

Quote:
Originally Posted by asherkin View Post
Compress everything, the time taken to do the extra request is going to take longer than decompression.
Okay. Will do. Thanks for the info guys!
robotortoise is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode