Skip to content

Mods download improvements#178

Merged
Vlad118 merged 7 commits intoTheHellBox:devfrom
florinm03:mods-download-improvements
Apr 4, 2026
Merged

Mods download improvements#178
Vlad118 merged 7 commits intoTheHellBox:devfrom
florinm03:mods-download-improvements

Conversation

@florinm03
Copy link
Copy Markdown
Contributor

@florinm03 florinm03 commented Apr 1, 2026

Problem

  • Data is being sent one packet per game update
  • If the game is out of focus and therefore running at a lower frame rate, it would result in a slower download
  • The UI isn't synced with the actual download status. So if you were tabbed out, the UI would be slower for a bit and later keep showing a download happening, although the client already received all packets. weird

Fixes

  • Actual bytes received and the UI showing it matches
  • It introduces cumulative byte counters (download_total_bytes, downloaded_bytes) so progress/speed no longer drop when one file finishes.
  • It also updates the network receive loop to process multiple packets per frame
  • Other safety checks and small fixes
  • Stopping in-between mounts all mods
  • Download speed in MB and ETA

To conclude, the download speed went from 10MB/s (and potentially waaay slower when having to download multiple mods) to 100MB/s locally on disk. The network will be the limiting factor.

Screenshot 2026-04-01 at 18 04 50

Also tested on a larger number of mods. Speed remained consistent:

Screenshot 2026-04-01 at 22 22 16

@florinm03 florinm03 changed the base branch from dev to master April 1, 2026 20:03
@Vlad118 Vlad118 linked an issue Apr 1, 2026 that may be closed by this pull request
3 tasks
@Vlad118
Copy link
Copy Markdown
Collaborator

Vlad118 commented Apr 2, 2026

Looks good to me. I think we should also try setting it to only download one mod at a time.
Advantages being:

  • prioritising downloading complete mods instead of multiple incomplete ones if cancelling download or having bad internet
  • less server strain as only one mod will be sent per connecting client
  • should improve TCP congestion

@Vlad118 Vlad118 requested review from Vlad118 and removed request for Vlad118 April 2, 2026 13:31
@Vlad118 Vlad118 changed the base branch from master to dev April 2, 2026 13:41
@florinm03
Copy link
Copy Markdown
Contributor Author

is everyone happy now? :))

@Vlad118 Vlad118 merged commit 54d1b6c into TheHellBox:dev Apr 4, 2026
Vlad118 added a commit that referenced this pull request Apr 5, 2026
…ates; faster and detailed mod downloads (#192)

* Use string.buffer for inter-VM communication (#183)

* Move from jsonEncode/jsonDecode to string.buffer, fix string.format syntax

* Remove spammy electrics print

* Fix missing "time_past" field when vehicle comes back into active view

* Remove unnecessary Lua queue

* Mods download improvements (#178)

* show download speed

* fix(download): stabilize speed/progress metrics and improve packet
processing

* add ETA

* keep track of already downloaded mods

* queue for one mod at a time

* remove unused and tidied code; delete incomplete mod download; added catches for more cases

---------

Co-authored-by: Vlad118 <vlad.stratulat1@gmail.com>

* Lua Code Modernization (#186)

* Use jsonWriteFile/jsonReadFile instead of opening and reading/writing manually

* Move to zero garbage alternatives for be: calls

* Move to setExtensionUnloadMode

* Use vec3 instead of deprecated Point3F

* Update to zero garbage object handling (1)

* Rewrite kissplayers.lua, Update to zero garbage object handling (2)

* Update to zero garbage object handling (3)

* Move to log() function away from print(), remove pointless prints

* Fix unused locals, whitespaces, indentations

* Update to zero garbage object handling (4)

* Avoid re-instancing UI colors

* Use global objectId instead of obj:getID()

* Remove more unused locals

* Remove incorrect vec3() constructor parameters

* Fix missed conversion to squaredDistance (kiss_transforms)

Co-authored-by: Vlad118 <96501158+Vlad118@users.noreply.github.com>

* Fix send_vehicle_meta_updates iterating over all vehicles and not only player owned ones

* Remove unused kiss_nodes, kissutils and associated code

---------

Co-authored-by: Vlad118 <96501158+Vlad118@users.noreply.github.com>

* fix for when master server domain is dead: added timeout for LUA (fixes slow game startup); offload blocking http listen and timeout for response

* DOMAIN CHANGE: from kissmp.online to kissmp.thehellbox.ru

---------

Co-authored-by: DaddelZeit <141176220+DaddelZeit@users.noreply.github.com>
Co-authored-by: florinm03 <116092053+florinm03@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download System

2 participants