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

Perfomance metrics and research about freeing used memory #401

Closed
leanmendoza opened this issue Apr 26, 2024 · 1 comment
Closed

Perfomance metrics and research about freeing used memory #401

leanmendoza opened this issue Apr 26, 2024 · 1 comment
Assignees

Comments

@leanmendoza
Copy link
Collaborator

No description provided.

@leanmendoza leanmendoza self-assigned this Apr 26, 2024
@kuruk-mm
Copy link
Member

Almost all the memory consumption was due to the Texture Sizes. We had 4k textures with more than 40mb in the VRAM, without any sense.

I did some tests with the following steps

  1. Open Godot
  2. Go to Genesis City
  3. Wait to load everything

And the results were:

Without any resize:
image

Resizing to 256x256 all the textures from fetch_texture
image

Resizing to 256x256 all the textures from fetch_texture and all textures in GLTFs
image

With this result. We implemented a Texture Quality Setting, to have multiple quality of texture with the following table

QUALITY MAX SIZE
LOW 256x256
MEDIUM 512x512
HIGH 1024x1024
SOURCE INFxINF

To free memory, we added a reference counter to all the resources, and when they have not been accessed for the last 30 seconds, and the reference count is just retained by the cache, we release them.

All that work is in the following PR: #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants