mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
Add matching session caching and native codegen improvements
- Introduced a new matching session caching mechanism in the Lua matching module to enhance performance with native code generation. - Rewrote the Lua matching algorithm to utilize session-based caching, reducing redundant computations and improving efficiency. - Updated Rust implementations to include session caching, ensuring consistency across both Lua and Rust. - Enhanced the `hydrate` function to support session management during instance hydration. - Added comprehensive tests to validate the new caching mechanism and its integration with existing functionality. These changes significantly improve the performance and maintainability of the matching process in the application.
This commit is contained in:
parent
307ac81aec
commit
b39c01e5e9
14 changed files with 1674 additions and 461 deletions
|
|
@ -17,6 +17,7 @@ local encodePatchUpdate = require(script.Parent.ChangeBatcher.encodePatchUpdate)
|
|||
local encodeInstance = require(script.Parent.ChangeBatcher.encodeInstance)
|
||||
local InstanceMap = require(script.Parent.InstanceMap)
|
||||
local PatchSet = require(script.Parent.PatchSet)
|
||||
local Matching = require(script.Parent.Reconciler.matching)
|
||||
local Reconciler = require(script.Parent.Reconciler)
|
||||
local strict = require(script.Parent.strict)
|
||||
local Settings = require(script.Parent.Settings)
|
||||
|
|
@ -625,7 +626,8 @@ function ServeSession:__computeInitialPatch(serverInfo)
|
|||
-- tracking them in the reconciler.
|
||||
Log.trace("Matching existing Roblox instances to Rojo IDs")
|
||||
self:setLoadingText("Hydrating instance map...")
|
||||
self.__reconciler:hydrate(readResponseBody.instances, serverInfo.rootInstanceId, game)
|
||||
local matchingSession = Matching.newSession()
|
||||
self.__reconciler:hydrate(readResponseBody.instances, serverInfo.rootInstanceId, game, matchingSession)
|
||||
|
||||
-- Calculate the initial patch to apply to the DataModel to catch us
|
||||
-- up to what Rojo thinks the place should look like.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue