billyb2 / game

GNU Affero General Public License v3.0
2 stars 0 forks source link

Memory efficiency improvements #15

Closed billyb2 closed 3 years ago

billyb2 commented 3 years ago

There are several improvements I can think of at the moment to make the game run faster and use much less memory (it's already fairly low, but efficiency is key when we think of the game running on mobile devices and single threaded web browsers running 50 other tabs). '

More should be added, I just can't think of any off of the top of my head. @Susorodni, if you could do the Vec::with_capacity thinkg I'd greatly appreciate it. Just have the capacity as however big you think the vec could be at max. Worst case scenario it just does another heap allocation which isn't a big deal.

billyb2 commented 3 years ago

Gonna close this to be honest. At the moment, work is focused on porting to Bevy, and I don't think a whole issue is needed just for replacing all Vec::new with Vec::with_capacity