Using array fields instead of massive number of objects

前端 未结 8 2246
无人共我
无人共我 2021-02-06 07:41

In light of this article, I am wondering what people\'s experiences are with storing massive datasets (say, >10,000,000 objects) in-memory using arrays to store data fields inst

8条回答
  •  我寻月下人不归
    2021-02-06 08:39

    Your question implies there is a problem. Has the memory usage proved to be a problem?

    If 100 bytes per item then it sounds like 1GB. So I'm wondering about the app and if this is a problem. Is the app to run on a dedicated 64 bit box with, say, 8GB or ram?

    If there is a fear, you could test the fear by an integration test. Instantiate say 20 million of these items and run some performance tests.

    But of course it does all come down the app domain. I have had specialised apps that use more RAM than this and have worked fine. Cost of hardware is often way less than the cost of software (yea it comes down to app domain again).

    See ya

提交回复
热议问题