简体   繁体   English

观察和同步极大的 JavaScript 对象

[英]Observe & Synchronize extremely large JavaScript Objects

actually i am working on a Project which requires to observe very large JavaScript Objects with many child objects (Client side).实际上,我正在研究一个需要观察具有许多子对象(客户端)的非常大的 JavaScript 对象的项目。 My aim is to synchronize all property changes using socket.io in relative.我的目标是使用相对的 socket.io 同步所有属性更改。 Some Properties are dynamically created, so that the whole object wouldn't fit to any Schema.一些属性是动态创建的,因此整个对象不适合任何架构。

I tried several object.observe polyfills but these failed in CPU Performance because of the Data Volume and amount of updating properties.我尝试了几个 object.observe polyfills,但由于数据量和更新属性的数量,这些在 CPU 性能方面失败了。

Is there maybe some Framework or lib wjich could help me with this?是否有一些 Framework 或 lib wjich 可以帮助我解决这个问题?

You should definitely try Mobservable , we use it in production already with similar amounts of data without any performance issues so far.你绝对应该尝试Mobservable ,我们已经在生产中使用了它,数据量相似,到目前为止没有任何性能问题。

This blog describes how you can mimic Object.observe using Mobservable in any ES5 environment.这篇博客描述了如何在任何 ES5 环境中使用 Mobservable 模仿 Object.observe。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM