GroupAI check calls

GroupAI check calls

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

GroupAI check calls

Post by AF »

According to MSVS debugger, everytime you select a unit it loads all the groupAIs and queries them then unloads them.

Why it has to load then unload the dll's is beyond me, especially when it does it when the dll is already loaded and running a groupAI.

And why these return values cant be cached, it isnt that much memory to have an array of bits (I believe there's an STL container for it too), indexed by the UnitDef index, which would rarely breach the 1kb mark, which is filled at startup.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It's because it calls a function to check whether the AI does allow to be assigned to a certain unit.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I know, i said that in my first post. Why it has to repeatedly do ti for every peewee in a group of ten peewees when the unit is selected and not once? Why it has todo them when they're selected and not when the selectAI button is pressed? And why the data cant be cached instead fo continuosly refigured out everytime a unit is selected.

This should only happen when the user presses the selectAI or the q button to list groupAI. Its like re-preloading MS Office when your mouse goes over the start menu button, or loading every webpage under the taspring.clan-sy.com domain everytiem you hover past a hyperlink to this site.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It's because it hasn't been implemented then. If it bothers you, patch it.

It has yet to show up in the top 5 of most CPU eating functions in my profiles of spring, and I really don't have time to optimize the least CPU intensive 95% of the spring code. (Let alone optimizing the most CPU intensive 5%... :o)
Post Reply

Return to “Feature Requests”