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

unity-aseprite-importer generates tons of garbage in RAM #52

Open
hippogamesunity opened this issue Nov 21, 2021 · 0 comments
Open

unity-aseprite-importer generates tons of garbage in RAM #52

hippogamesunity opened this issue Nov 21, 2021 · 0 comments

Comments

@hippogamesunity
Copy link

hippogamesunity commented Nov 21, 2021

Hi! I've found that your importer may generate a lot of garbage in RAM.

You can try loading the small demo image attached (256x256 px) and check Unity's Profiler. Here is a screenshot where new AseFile(stream); takes more that 1 GB RAM when loading it.
image

Another issues that I've found that you create temp textures and leave them in RAM. For example, here is your GetFrame(int index) method where Texture2DBlender generates new textures. I've made a workaround with destroying textures:
image

Demo project: https://drive.google.com/file/d/147BEdQGPhsTpYh54UNZlx5C5zPCbWrV-/view?usp=sharing

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

No branches or pull requests

1 participant