thatopen-errors-performance
ThatOpen Performance and Memory Management
Overview
BIM models are large. A typical building model contains millions of triangles, thousands of IFC elements, and dozens of material definitions. Without proper memory management, a single model can consume gigabytes of browser memory and crash the tab. This skill covers every performance-critical pattern for ThatOpen applications: disposal chains, memory budgets, worker offloading, GPU optimization, and strategies for handling models that exceed normal limits.
Critical Rules
-
ALWAYS dispose resources when done. Every
FragmentsModel,THREE.Mesh,THREE.Material, andTHREE.Textureholds GPU memory. The browser garbage collector does NOT free GPU resources — you must call.dispose()explicitly. -
ALWAYS dispose in the correct order.
components.dispose()handles ordering internally (FragmentsManager last). When disposing manually,