screepers / simpleAllies

Allows for simple communication between allies using a public segment
MIT License
1 stars 4 forks source link

Classify and cleanups #12

Open tiennou opened 5 months ago

tiennou commented 5 months ago

This comes from me trying to integrate it in OM, since it has its own segment manager, handles instantiation, etc.

The big changes are that any sort of segment access goes through protected methods (so supposedly you just subclass it and provide your own stuff), and loads the segments in a round-robin, so you can always look at the last state you saw from an ally. The rest is mostly style cleanups.

Better look at the individual commits. I can definitely slice and dice stuff if it feels not appropriate (I realize writing this that caching all that stuff makes it hard on the heap usage, for example).

CarsonBurke commented 5 months ago

I want to like this but I have concerns. Caching all the ally data is going to add a lot of heap. Have you done profiling on potential heap usage increases, coinciding gc and cpu costs? @tiennou