Use string.buffer for inter-VM communication#183
Merged
Vlad118 merged 5 commits intoTheHellBox:devfrom Apr 3, 2026
Merged
Conversation
Collaborator
Vlad118
reviewed
Apr 3, 2026
KISSMultiplayer/lua/vehicle/extensions/kiss_mp/kiss_electrics.lua
Outdated
Show resolved
Hide resolved
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This moves from JSON for inter-VM communication to the LuaJIT String Buffer library. This is important for modernization and performance reasons, as this library performs much better than the JSON or Lpack serializer.

This also fixes the redundant string concatenation between string.format and base strings introduced in #174 .
jsonEncode in lines 150-152 of kiss_electrics.lua needs different handling (or can be left as-is), as it calls network.send_data directly. And since communications to the bridge are JSON only, re-encoding the data is obviously less performant than right now.