Skip to content

avoid draw buffer -> display buffer copy#843

Merged
etpinard merged 1 commit into
plotly:masterfrom
monfera:avoid-gl-buffer-copy
Aug 12, 2016
Merged

avoid draw buffer -> display buffer copy#843
etpinard merged 1 commit into
plotly:masterfrom
monfera:avoid-gl-buffer-copy

Conversation

@monfera

@monfera monfera commented Aug 11, 2016

Copy link
Copy Markdown
Contributor

General WebGL speedup (currently done for 2D plots only) that can help low-end platforms such as current MacBook and mobile platforms that have large display buffers (high resolution)

@etpinard

Copy link
Copy Markdown
Contributor

Hmm. How does this affect to-image exports?

If I recall correctly preserveDrawingBuffer has to be turned on for to-image to work correctly (I might be wrong though).

@monfera

monfera commented Aug 11, 2016

Copy link
Copy Markdown
Contributor Author

Thanks for highlighting this potential issue. For the record, we decided to check effects and if needed, apply the synchronous export approach which doesn't need preserveDrawingBuffer to be true (buffer isn't cleared yet).

@monfera

monfera commented Aug 11, 2016

Copy link
Copy Markdown
Contributor Author

... I was curious since further tests showed that Chrome, Safari and FF all seem to export fine with this flag set to false. I believe it's because, for the 2D plots at least (for which this PR applies) there's already an intention to be synchronous:

  1. The render loop is temporarily disabled
  2. There is a single draw call performed synchronously just before the export

With this and as discussed, I'd leave the call with your further investigation and decision. On reasonable hardware this PR doesn't seem mandatory for a decent framerate even with the upcoming pointcloud but probably helps weaker notebooks and mobile.

@etpinard

Copy link
Copy Markdown
Contributor

After some testing in browsers and in our nw.js image exporter, this PR has no unwanted side-effects.

Merging for perf 💊

Thanks @monfera !

@etpinard etpinard added this to the v1.17.0 milestone Aug 12, 2016
@etpinard
etpinard merged commit acff0da into plotly:master Aug 12, 2016
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

Successfully merging this pull request may close these issues.

2 participants