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

Consume less GPU memory on inactive tabs #1775

Closed
toddmedema opened this issue May 7, 2018 · 1 comment
Closed

Consume less GPU memory on inactive tabs #1775

toddmedema opened this issue May 7, 2018 · 1 comment
Milestone

Comments

@toddmedema
Copy link

toddmedema commented May 7, 2018

Deck.gl applications can easily use 100's of MB of GPU RAM; if users have multiple tabs of deck.gl applications open, it can easily overwhelm a lightweight laptop's available GPU memory, causing system-wide issues. (OS X seems to manage it better, but I've seen it lock up an Ubuntu computer)

Suggest adding some default (but disable-able) intelligence around rendering a dummy grey scene on inactive tabs. As it happens, I have example code for good tab activity detection from another project:

https://github.com/ExpeditionRPG/expedition-app/blob/master/app/Main.tsx#L162-L168
plus
https://github.com/ExpeditionRPG/expedition-app/blob/master/app/Main.tsx#L298-L304

To be nice to users and make it less aggressive, we might consider only marking tabs as inactive if they've been inactive for 5+ minutes. There might also be a way to page the scene to host memory instead of dropping it entirely? (although that would just shift the GPU memory shortage problem to RAM)

@ibgreen
Copy link
Collaborator

ibgreen commented May 7, 2018

@toddmedema

Agreed, the time has come to look into this. Quick comments:

  • deck.gl rendering is already driven by requestAnimationFrame which is not called on hidden tabs.
  • The memory consumption is mostly unrelated to the rendering, it is related to data updates. Depending on how those are triggered the may still be happening.
  • The best initial approach might simply be to increase reuse of GPU buffers. The code is not very optimized in this regard and this is already on our near-term roadmap.

@ibgreen ibgreen added this to the v6.0.0 milestone May 7, 2018
@ibgreen ibgreen modified the milestones: 6.0.0, 6.1.0 Jun 8, 2018
@jianhuang01 jianhuang01 modified the milestones: 6.1.0, Backlog Aug 20, 2018
@ibgreen ibgreen mentioned this issue Jan 3, 2019
27 tasks
@tgorkin tgorkin closed this as completed Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants