The International Simutrans Forum

 

Author Topic: [db357ad] Nightly Linux builds bloating  (Read 1098 times)

0 Members and 1 Guest are viewing this topic.

Offline Spenk009

  • *
  • Posts: 227
[db357ad] Nightly Linux builds bloating
« on: December 09, 2017, 07:59:39 AM »
Upon taking the leap and switching over to a Linux distro I've come to start downloading the .deb nightly versions. After installing, which works quite well for me (even as a novice) it did bug me that the installer is more than thrice the size of the Windows zip.

I've noticed that the package contains two copies of Pakbritain and another copy of the source files of the pak. This effectively triples the size.

Maybe removing one copy and the source files could reduce download times, free up bandwidth of the server and allow online play.

Online jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18379
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [db357ad] Nightly Linux builds bloating
« Reply #1 on: December 10, 2017, 01:03:38 AM »
Thank you for the suggestion - I will have to look into this when I have time. I have very little experience of setting up these .deb packages, and only limited opportunities to test that this is working properly.

Offline Spenk009

  • *
  • Posts: 227
Re: [db357ad] Nightly Linux builds bloating
« Reply #2 on: December 10, 2017, 06:54:07 AM »
I understand entirely. There are bigger tasks on hand at the moment and you're fully involved in the whole mail & pax classes code. This affects very few users, while the other issues affect all users.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2588
  • Languages: EN
Re: [db357ad] Nightly Linux builds bloating
« Reply #3 on: December 10, 2017, 09:00:00 AM »
If one can place the files loosely on a server then one could develop some kind of auto update system. I believe that currently very few files are changing each night however one still needs to download everything.

The tool would work by first recording the SHA-1 (or SHA-256) hash of each file that makes up extended. This gets stored in a file on the server, which should be fairly small (<<1MB). The clients then run a tool which downloads the nightly build list from the server and compare it to its current list. Any files which have had their recorded hash changed are then downloaded individually and replace the existing file. Same applies to file additions and deletions. Once all such differences have been resolved it then finally updates the hash list itself. Technically the hash list is not required client side as it could be built from the current install but its cache like nature would speed up the update process considerably.

The potential bandwidth savings might be quite significant and add up to many GBs every week.