Closed lakhoune closed 2 years ago
The function _syncObjectToMap is very slow. For a large success model, it takes roughly 9 seconds to complete
The function _syncObjectToMap recursively calls itself to sync a simple object to yjs by deconstructing the object and transforming each subobject into ymaps that store primitive types. This is actually not necessary, as you can store whole objects in a map. I have pushed some changes that drastically reduce the execution time to around 8ms
Seems to be fixed for now. At least, even for large success models with 50 measures
Describe the bug The success modeling page become unresponsive on the first load of the page
To Reproduce
Additional context Make sure to load a success model large enough in size to experience this bug. This might be linked to yjs blocking the main thread since the same happens on the social bot frameworks page