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

Reduce the amount of data uploaded to the GPU #8243

Open
2 of 5 tasks
mourner opened this issue May 14, 2019 · 2 comments
Open
2 of 5 tasks

Reduce the amount of data uploaded to the GPU #8243

mourner opened this issue May 14, 2019 · 2 comments
Assignees
Labels
performance ⚡ Speed, stability, CPU usage, memory usage, or power usage

Comments

@mourner
Copy link
Member

mourner commented May 14, 2019

One of the things that affects GL JS rendering performance linearly and that we can track reliably is the amount of data we upload to the GPU for rendering (given the same style). Specifically, the total size of data given to bufferData calls.

There are two directions we can explore for this — fixing older regressions and finding new ways to upload less.

Fixing regressions

Looking at historical metrics of how much data we upload throughout previous GL JS version, I found 3 regressions:

Adding new savings

Some things we could explore from the top of my mind:

cc @ansis @kkaefer

@mourner
Copy link
Member Author

mourner commented May 30, 2019

#5184 has a ~5% regression but I'm not sure why. Needs to be investigated.

Turns out the overhead is in fill layers with fill-antialias: false. Previously, since we uploaded buffers on render, we didn't upload line index data for outline rendering if it's not drawn. Now, since we upload buffers beforehand, line index data is uploaded regardless whether we need it or not. cc @ansis

@mourner
Copy link
Member Author

mourner commented May 31, 2019

As a result of #3061 and #3120, we upload data for zero-opacity layers, which can significantly increase the amount of unnecessarily uploaded data for some style/zoom combinations. On z11.1 Mapbox Streets v10 sample, it's a ~12% regression.

This is also something that's now hard to fix because of the coalescing of buffer uploads independently of drawing (#5184). However, it's probably not worth fixing because it's rare to have affected layers in newer, expression-based styles (which usually have feature-based rather than global zoom-based opacity set).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance ⚡ Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

1 participant