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

GPU memory not freed after unmounting Deck component. #3039

Closed
Lowhearth opened this issue Apr 29, 2019 · 6 comments
Closed

GPU memory not freed after unmounting Deck component. #3039

Lowhearth opened this issue Apr 29, 2019 · 6 comments
Assignees
Labels

Comments

@Lowhearth
Copy link

Lowhearth commented Apr 29, 2019

Description

GPU memory not freed after unmounting Deck component.

Repro Steps

  • Go to https://deck.gl/#/examples/core-layers/

  • Open Google Chrome task manager and enable the GPU Memory column.

  • Switch between the demos and see how the GPU Memory permanently increases every time a new one is displayed

Environment (please complete the following information):

  • Framework Version: 7.0.3
  • Browser Version: Chrome 73.0
  • OS Ubuntu 18.04.2 LTS

Logs

memory
memory2
memory3
memory5
memory6
memory7

@Pessimistress
Copy link
Collaborator

Pessimistress commented Apr 29, 2019

@tsherif @ibgreen There are several layers to this issue:

@tsherif
Copy link
Contributor

tsherif commented Apr 30, 2019

I don't think we should worry too much about the shaders. If buffers and textures are now properly released, that should address this issue.

@ibgreen
Copy link
Collaborator

ibgreen commented Apr 30, 2019

That would be my sense as well.

But maybe they hold on to the context, preventing it from being garbage collected?

@tsherif
Copy link
Contributor

tsherif commented Apr 30, 2019

Oh, interesting point. Is unmounting a deck.gl component meant to completely release the gl context?

@ibgreen
Copy link
Collaborator

ibgreen commented Apr 30, 2019

Is unmounting a deck.gl component meant to completely release the gl context?

Hmm, I would have to check the code to answer that. The ideal resource management design is typically that release is "symmetric" with creation, so if we create during mount then yes.

Regardless, when we are done with the context it makes sense to make sure we don't prevent garbage collection by e.g. having objects in e.g. a global map like a shader cache referencing it.

@Pessimistress
Copy link
Collaborator

Partial fix published in 7.0.4

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

No branches or pull requests

4 participants