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

Loading uses too much memory #303

Closed
tiboretk opened this issue Aug 26, 2019 · 2 comments
Closed

Loading uses too much memory #303

tiboretk opened this issue Aug 26, 2019 · 2 comments
Milestone

Comments

@tiboretk
Copy link

tiboretk commented Aug 26, 2019

Describe the bug

Loading several glft models that reference same Albedo, NormalMap and SpecularMap load each texture separately for each model so multiple instances of same textures end up in memory.
The textures on a disk use around 300-400kB while in memory each of them uses 32MB leading to a several GB of memory usage for dozen of models.

To Reproduce

Load several different models that reference same textures. Textures are not reused yet they get loaded each time on different model load.

Expected behavior

If different gltf models reference same texture they should reuse it and optimally load only one shared texture among them.

Screenshots

image

Environments (please complete the following information):

  • OS: [e.g. Windows 10]
  • UniVRM version: [e.g. 0.52.0]
@tiboretk
Copy link
Author

Solved! 解決済み:)
I solved the issue by updating ProcessOnMainThread() to store texture references.

@tiboretk tiboretk reopened this Aug 27, 2019
@hiroj hiroj added this to the v0.57 milestone Jun 1, 2020
@hiroj
Copy link
Contributor

hiroj commented Jun 22, 2020

If you want to share resources, try extending ITextureLoader.

@hiroj hiroj closed this as completed Jun 22, 2020
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

2 participants