Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

V1.27.0 emotionfx memory fixes #535

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

mik403
Copy link

@mik403 mik403 commented Jan 11, 2021

These are set of memory improvements, as discussed on the private forum, LY-23014
See discussion topic for more info and results.

Next changes were made:

  • Decreased translation precision on MotionDataBuilder
  • Shrink shared data in Importer to reclaim some memory
  • Change reservation strategy in MotionInstancePool to reduce fragmentation
  • Released unused raw asset data in EmotionFX asset to reclaim memory after asset initialization
  • Removed GPU deformed meshes from CPU after its skinning

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AMZN-Gene
Copy link

Thanks, this is great! I'll work on getting these optimizations into LY Vanilla!

@@ -634,6 +634,7 @@ namespace EMotionFX
// get rid of shared data
ResetSharedData(sharedData);
sharedData.Clear();
sharedData.Shrink();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the clear/shrink needed since sharedData is going out of scope and will be destroyed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants