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

Make use of Domain Memory. #1058

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

Make use of Domain Memory. #1058

wants to merge 5 commits into from

Conversation

HaimZik
Copy link
Contributor

@HaimZik HaimZik commented Jun 1, 2019

Unlike previous efforts this implementation does not use one big ByteArray but switch between ByteArray
only for each ByteArray which is bigger than ApplicationDomain.MIN_DOMAIN_MEMORY_LENGTH(1024 bytes). There is no memory fragmentation because the largest allocation is the size of the max batch length. Context3d createVertexBuffer limit batch size to 65535 vertices and 256 byte per vertex, which is 16.77696 megabyte.
There is no (significant) impact on memory.
Apps which use high poly count will benefit, such as apps that use particle system.
I made a branch of the Particle System which make use of this update.
https://github.com/HaimZik/Starling-Extension-Particle-System

An performance analysis.
https://forum.starling-framework.org/d/21731-made-starling-use-domain-memory

Domain Memory is only used on ByteArray bigger than ApplicationDomain.MIN_DOMAIN_MEMORY_LENGTH which is 1024 bytes.
@PrimaryFeather
Copy link
Contributor

Thanks a lot for the pull request! I‘m currently on a vacation, so I haven‘t been able to look into it in detail yet. Domain memory usage has always been tricky, especially when attempting to integrate it directly into the framework and not have any negative side effects in some situations or on some platforms, so this needs to be carefully evaluated. I‘ll do that when I‘m back home!

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.

2 participants