Browser crashes when loading large files (dxf, glTF, etc.)

  1. For large models not only does that not help (you’re not really reducing the size of the memory used - at best it’d reduce the amount of draw calls, but draw calls aren’t crashing tabs, they just freeze them.), it may actually cause more issues, since merging multiple objects into a single geometry prevents frustum culling. So you’ll effectively be rendering absolutely everything at any given moment, regardless if it’s visible to the camera or not.
  1. Mobile devices (esp. iOS before this happens) have very strict memory limits. There’s no way to increase these limits for WebViews, so the only solution would be to limit the rendered / visible / stored-in-the-memory objects.

  2. For large-scale models, you have to take into consideration that WebGL / three.js is simply not as powerful as native 3D apps like UE / Unity. Use LODs and spatial indexing to limit large worlds and models to only the parts that are essential for the user to see - and if there’s memory / rendering capacity left, only then render the fancy stuff. Also - consider imposters, they look convincing and are essentially a texture-representation of 3D models.

2 Likes