Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: release asset buffers once assets are loaded #106

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

hannojg
Copy link
Member

@hannojg hannojg commented Apr 12, 2024

In the clients app I can tell that the buffers are seldomly cleaned up. It easily lets the app allocate multiple GBs of memory before considering cleaning those up.

Actually we need a mechanism to cleanup everything, not just the buffers. Use case is for instance:

  • Opening a new screen with Filament + Engine
  • Leaving that screen (screen is destroyed)
  • Engine + Filament view not getting cleaned up immediately and might be dangling for super long

That seems to involve some more elaborate mechanisms such as a dispose API that can be called from JS or using native state + adding memory pressure to the NativeState object.

@hannojg hannojg merged commit b7184e6 into main Apr 12, 2024
@hannojg hannojg deleted the fix/memory-allocations branch April 12, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant