Modelling for a web-app

List of factors affecting the model speed on Packhunt.

Description

Models operate differently on the web compared to running locally. When building Grasshoper models for the web, you can take additional steps to optimise the model solving time for a performant web-app.

The time it takes for the model to solve and display geometry in the web viewer depends on several factors:

  • Loading the model
    The model file is loaded each time it solves in a web-app. If your Grasshopper file is large, loading will take longer. This loading time is comparable to opening your Grasshopper file for the first time.

  • Solving the model
    The model’s runtime depends on the performance of the Grasshopper definition. Simple numerical operations are typically fast, while geometric intersections take longer to solve.

  • Rendering the geometry in the Viewer
    Visualising the output geometry with materials and lighting also adds to the total duration. Some geometry types are lighter than others. For example, a box geometry is represented with less data than other geometry types in the background, therefore is faster.