从非常大的共享对象数据中快速访问一段数据
我使用sharedObject 在用户硬盘上缓存了非常大量的数据,这些数据可能有0.5GB。 但我不想将整个sharedObject放在内存中,并且数据也需要非常快地访问。 我应该将数据分成多个共享对象,还是您认为加载整个数据并每次都对其进行垃圾收集不会有问题?
I'm caching really big amount of data on the users hard-drive using sharedObject, this data can be like 0.5GB. But I don't want to place the whole sharedObject in memory, and the data also needs to be accessed very fast. Should I split the data up into multiple sharedObjects, or do you think it wouldn't be a problem loading the whole thing in and letting it be garbage-collected each time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我倾向于认为多个共享对象将是最好的方法,但我不知道您的性能要求是什么。 我不认为垃圾收集会成为一个问题——看起来它并不比一次加载整个 0.5GB 更糟糕。 最终,你最好的选择就是进行实验。
I would be inclined to think that multiple shared objects would be the best way to go, but I don't know what your performance requirements are. I'm not inclined to think that the garbage collection would be an issue -- it doesn't seem like it could be any worse than loading the whole 0.5gb at once. Ultimately, your best bet here is going to be to experiment.