Facepunch / garrysmod-requests

Feature requests for Garry's Mod
83 stars 24 forks source link

Support xz compression for FastDL #1026

Open sweepies opened 7 years ago

sweepies commented 7 years ago

xz produces smaller files, that take less time to decompress, compared to bzip2.

The caveat is that compression takes longer, however this only has to be done once, on the server. This makes xz more desirable in the case of FastDL, where the concerns are size, and decompression time.

stickz commented 6 years ago

Do you know what takes even less time? Workshop and a little bit of coding skills.

FastDL is an undesirable choice in all cases, regardless what compression it uses.

If you're concerned about maps, send them while the client is playing using the workshop api. This way, the maps will be on their hard drive. You can skip the download stage all together and go to decompression.

OmarAssadi commented 6 years ago

Do you know what takes even less time? Workshop ...

Often workshop appears to be the better choice. However, I have a number of users in areas that are not-so-well-served by the official Steam servers. FastDL in our case is significantly faster - even with the current limitations. In those edge cases, FastDL is nice as you can build your own infrastructure or use a CDN that better suits your area than Steam.

stickz commented 6 years ago

FastDL will require more improvements than just .xz compression to be reliable; like multi-threaded decompression and multiple concurrent web-server requests.

I have a two node CDN with very powerful transit. Workshop still works better for 95% of clients. I also send maps while the client is playing, so they only need to decompress during map change.

sweepies commented 6 years ago

I think that no matter how right or wrong you are, whether or not you should use the workshop is not the scope of this issue.

Some people use FastDL. I'm sure they'd like it to perform better.

You even made an issue on this topic. How are your suggestions relevant but using a better compression algorithm is not?

OmarAssadi commented 6 years ago

Of course FastDL could use a lot of improvements; your issue (#963) sums most of them up. But, I don't think that should be a reason to dismiss improvements. Bit of a catch-22, you know?

The workshop system could also use some significant improvements. But, as of right now, there doesn't appear to be any form of delta patching available. So, assuming a community uses a single, large workshop addon for its custom content, you have to re-download the entire package for a tiny change. FastDL has its own issues in regards to that; as you mentioned, there is no integrity checks. However, one of the nice advantages it does have is that since files are downloaded individually, you could always just send a new version of a single file instead of the entirety of a GMA again.

And, again, workshop may work better for you and your users 95% of the time. But, that is not the case for everyone. I live in Russia and there are a lot of areas here in my country where Steam has a significantly weaker connection than my own personal servers do.