Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

Engine Cleanup Optimization

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


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

#1 ThyReaper   Members   

488
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



#2 Andreas Jonsson   Moderators   

4629
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   

4629
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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.