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
In our project, we're seeing performance degradation that we've tracked down to the usage of the MobX toJS function in PersistStore.ts on ine 166. Swapping toJS(propertyData) out for the "classic" JSON.parse(JSON.stringify(properyData)) improves performance massively and the property's data appears to be exactly the same.
I'm wondering what makes the use of MobX toJS required here? Is it simply to dereference the propertyData? Or is it to account for implementations that may well be more complicated than our own? I'm not proposing changes, I'm simply trying to assess whether I can patch the package for now (we intend moving away from MobX later in the year).
I'm aware that there is now the option of using a SerializableProperty but if we implement individual property serialization, we will have to migrate existing stored data.
The text was updated successfully, but these errors were encountered:
In our project, we're seeing performance degradation that we've tracked down to the usage of the MobX
toJS
function inPersistStore.ts
on ine 166. SwappingtoJS(propertyData)
out for the "classic"JSON.parse(JSON.stringify(properyData))
improves performance massively and the property's data appears to be exactly the same.I'm wondering what makes the use of MobX
toJS
required here? Is it simply to dereference thepropertyData
? Or is it to account for implementations that may well be more complicated than our own? I'm not proposing changes, I'm simply trying to assess whether I can patch the package for now (we intend moving away from MobX later in the year).I'm aware that there is now the option of using a
SerializableProperty
but if we implement individual property serialization, we will have to migrate existing stored data.The text was updated successfully, but these errors were encountered: