You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Client is laggy.
The entities store is updated every time any table is updated.
Due to how the tables are structured, with CarriedBy, indicating which pod a machine belongs in, not being a key there does not seem to be a way for us to filter to only get the content of the players pod from the indexer.
Continuation of #262
Problem
Client is laggy.
The
entities
store is updated every time any table is updated.Due to how the tables are structured, with
CarriedBy
, indicating which pod a machine belongs in, not being a key there does not seem to be a way for us to filter to only get the content of the players pod from the indexer.The loading problem in #262 was improved by not relying on the update streams to set the initial local state. Rather using this:
https://github.com/Moving-Castles/this-cursed-machine/blob/main/packages/client/src/svelte/modules/systems/initEntities.ts
And then ignoring updates where the new and old values are the same:
this-cursed-machine/packages/client/src/svelte/modules/systems/createComponentSystem.ts
Line 14 in c64eed6
Problems are:
entitites
store is large and growingHow do we ignore updates that are not relevant to the player?
The heavy part of the update is this:
this-cursed-machine/packages/client/src/svelte/modules/systems/createComponentSystem.ts
Line 25 in c64eed6
Solutions / improvements
initEntites
, only write the data that is relevant to the player.createComponentSystem
, abort before updating store if the data is not relevantThe text was updated successfully, but these errors were encountered: