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

Tracker: Performance #83

Open
11 of 27 tasks
ibgreen opened this issue Sep 26, 2016 · 3 comments
Open
11 of 27 tasks

Tracker: Performance #83

ibgreen opened this issue Sep 26, 2016 · 3 comments
Milestone

Comments

@ibgreen
Copy link
Collaborator

ibgreen commented Sep 26, 2016

Attributes/WebGL (memory use, buffer creation etc)

  • Provide a target array for attribute updaters to write into, avoiding generation of millions of temporary objects during certain attribute generation.
  • Support generic vertex attributes: Setting an accessor to a constant would cause a generic vertex attribute to be set, completely bypassing attribute generation (requires luma.gl fix).
  • Create a shared instancePickingColors attribute (resized to a high water mark) that can be shared between all layers, instead of generating one for each layer (could give a 20-25% boost in attribute update time for many layers, in addition to obvious memory savings).
  • Use single interleaved WebGL buffers with offsets and strides separating attributes (may only give <5% improvement on modern GPUs)
  • Pack colors and picking colors as Uint8s instead of Float32s
  • Allow apps to pre generate and pass in WebGL Buffers (not just typed arrays) as props.
  • Investigate inactive tabs and GPU memory optimizations Consume less GPU memory on inactive tabs #1775

GeoJsonLayer etc optimizations

  • Eliminate high cost of geojson splitting for Paths and Polygons
    • Make PathLayer support multipaths, and empty paths
    • Make SolidPolygonLayer support multipolygons, and empty polygons
    • Make GeoJson pass through unmodified FeatureCollection to PathLayer and SolidPolygonLayer
  • Improve Tesselation support to ensure custom geometries are built in most efficient way.

Layer lifecycle optimizations

  • Separate changeFlag dirtying from layer updates
  • Disable attribute updates for non-visible layers (requires previous)
  • Disable CompositeLayer.renderLayers on shouldUpdate returns false (i.e. reuse layers from last render)
  • Allow reuse of layers and optimize Layer matching accordingly (see Support reusing Layer instances #257)
  • Layer matching - Use a map to match layer ids vs. repeated linear searches O(N) vs O(N2)

Picking

  • Allow the app to control what type of picking a layer supports (e.g. hover vs. click vs. none) - as hovering over a very large layer can cause noticeable CPU activity, while clicks are much less frequent.
  • Under WebGL2, use WebGLBuffer for readPixels to reduce GPU roundtrip costs.
  • Mode that disables picking during pan and zoom operations?
  • Document how to override default color based picking, for layers that can provide more efficient mathematical implementations (e.g. regular tilings like grid and hexagons layers).
  • Allow multiple layers to render picking colors into the same framebuffer, so that we only need one (or at least fewer) expensive calls to gl.getPixels
  • Reuse framebuffer between picking operations.

Effects

  • Provide another appropriately resized framebuffer or texture as common scratch pad area, to avoid each effect allocating its own?
  • Refactor life cycle management so that effects can also use it?

API optimizations

  • Animation mode - allow some uniforms to be updated between WebGL frames without requiring passing new layers to deck.gl.
  • Expose AttributeManager to apps - so that apps can precalculate attributes, and reuse buffers that are shared between layers.
@ibgreen ibgreen changed the title Performance Ideas Performance Ideas Tracker Jan 26, 2017
@ibgreen ibgreen changed the title Performance Ideas Tracker Performance Ideas (Tracker) Jan 26, 2017
@ibgreen ibgreen added P1 and removed help wanted labels Mar 3, 2017
@k
Copy link

k commented Jul 20, 2017

Are there any plans for when these performance improvements will be done?

More specifically reusing layers.

@Pessimistress
Copy link
Collaborator

@k Reusing layers should be available in 4.1.0-beta. It is still experimental, so testing is welcome.

@k
Copy link

k commented Jul 26, 2017

@Pessimistress great thanks. I'll check it out soon.

@ibgreen ibgreen added this to the v4.2 milestone Nov 13, 2017
@ibgreen ibgreen modified the milestones: v4.2, v5.0 Nov 28, 2017
@ibgreen ibgreen added the perf label Nov 28, 2017
@tgorkin tgorkin changed the title Performance Ideas (Tracker) Tracker: Performance 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

3 participants