caves icon indicating copy to clipboard operation
caves copied to clipboard

Reduce Memory Usage

Open sunjay opened this issue 6 years ago • 1 comments

Need to measure memory usage and then reduce it so we aren't being so wasteful. For example, we duplicate and clone animations and sprites all the time for the Animation, AnimationManager, and Sprite components. We should instead have a global animation manager where we can dedup all of the animations and sprites based on some ID and just store the ID within the components. For example, instead of giving every entity an AnimationManager with a clone of all the animations, we could give one SpriteSet component with a sprite set ID.

Code as of 2018-11-08 11:37 PM: 18 MB (297356 kB) (command)

sunjay avatar Nov 05 '18 02:11 sunjay

Although animation cannot be deduped, animation manager certainly can be.

sunjay avatar Dec 03 '18 03:12 sunjay