Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Engine Cleanup Optimization

  • You cannot reply to this topic
2 replies to this topic

#1 ThyReaper   Members   -  Reputation: 462

Like
0Likes
Like

Posted 05 August 2014 - 11:38 AM

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.

Attached Files



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 05 August 2014 - 11:57 AM

Thanks.

 

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


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 07 September 2014 - 03:35 PM

I've included this in revision 2005.

 

Regards,

Andreas


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game





PARTNERS