Glossary · Performance

Draw calls

In short

A draw call is a single drawing command sent to the graphics card, such as "draw this mesh with this material". Each call carries overhead, so a few large calls are generally faster than many small ones [1].

Why the number matters

The GPU draws triangles very quickly. What is often expensive is getting there: for each call the browser prepares state, binds textures and buffers and hands over commands. MDN therefore recommends batching draw calls into fewer, larger ones; 1,000 sprites, for instance, ideally in a single call [1].

A product with 400 individually modelled screws, each with its own material, can therefore be slower than a model with twice the triangles in a few parts.

Measuring

In three.js the renderer reports the number of draw calls per frame directly (renderer.info.render.calls) [2]. That figure belongs in every performance budget alongside triangles and file size.

Fewer draw calls: the levers

  • Merge meshes: parts that never move separately and share a material become one mesh. The gltfpack tool can merge meshes for this [3].
  • Share materials: identical surfaces use the same material rather than copies.
  • Texture atlas: several textures in one image allow larger batches [1].
  • Instancing: draw many identical parts in one call [4].

The trade-off in a configurator

A configurator needs to address parts individually: recolour, swap, hide, explode. Merging everything into one mesh prevents that. The skill lies in merging only as far as the interaction allows and handling the rest with instancing.

In the spiral stair configurator (example configurator, fictional product) all treads and all balusters are each drawn as one instanced mesh rather than dozens of separate parts. The 3D product viewer page covers performance on product pages.

Related terms

  • Instancing

    Instancing is a technique in which the graphics card draws many copies of the same mesh and material in a single call, with position, rotation and scale (and optionally colour) differing per copy. It saves draw calls.

  • Render loop and render on demand

    The render loop is the cycle in which a 3D application redraws its image frame by frame. Render on demand means calculating a new frame only when something has changed, instead of constantly at the display's refresh rate.

  • WebGL

    WebGL (Web Graphics Library) is a JavaScript API that lets web pages draw hardware-accelerated 2D and 3D graphics in the browser without plug-ins. It renders into an HTML canvas element using the device's graphics hardware.

  • Polygon mesh

    A polygon mesh describes the surface of a 3D object as a network of vertices, edges and faces. In the end, graphics cards draw surfaces as triangles, and glTF stores surfaces as triangles too.

  • Shader

    A shader is a small program that runs on the graphics card and calculates where geometry lands on screen and what colour each pixel receives. On the web, shaders are written in GLSL (WebGL) or WGSL (WebGPU).

Examples to try

Example configurator · fictional product

Spiral stair configurator

Plan a spiral stair: enter floor height and opening, treads and rotation are calculated, choose diameter, direction, railing and materials – with an example check and a PDF enquiry.

Stairs & access · Dimensions and sizes · Materials and finishes · Options, modules and accessories

Sources

  1. MDN Web Docs: WebGL best practices
  2. three.js docs: WebGLRenderer
  3. meshoptimizer: gltfpack
  4. three.js docs: InstancedMesh

← All terms in the glossary