• Advertisement
Sign in to follow this  

Engine Cleanup Optimization

This topic is 1233 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I discovered a bottleneck in the cleanup process in AngelScript which caused our game to take much longer to shutdown than expected. It seems that all the time was being spent in ClearUnusedTypes() which used a linear search for removing types.

 

I replaced the vector with a set (emulated with a map, to be able to use the same data structures the library normally uses), removing the bottleneck. We've been using this change for a few weeks without issue.

Share this post


Link to post
Share on other sites
Advertisement

Thanks.

 

I've been meaning to refactor the clean-up for quite some time. I'll look into the enhancement that you've provided.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement