I want to have a dictionary of dictionaries that will contain animators. The this is, those are not supposed to ever change so I was hoping that I could make the dictionaries be pre-made or in any other way make them power-efficient.
If anyone could give me ideas I would very much appreciate it.
Thanks in advance
In terms of power efficiency, as long as you’re only writing to the dictionary once over the course of the application lifetime it probably doesn’t matter when you create the objects. You will need to do the same amount of work no matter what.
True, however, I do not see a reason why I should set the dictionary every time I boot the system. I have no understanding of the subject but it seems like something that would just make the initial booting longer. Is there no way to avoid it?
If you want to use the data in your program it has to be loaded into memory. There is no way around this. One thing you can do is something called lazy loading where you only load the data into memory when you actually need it. The benefit of this is that if you never end up using the data you don’t waste time loading it. The drawback is that if loading is slow you may end up loading at a time that is inconvenient for the user resulting in a bad experience.
If you only need bits and pieces of the data at a time you can keep it in separate files/assets and only load it in little chunks as needed. It really depends on the nature of your data and your expected access patterns over the course of your game.