Skip to content

Incremental loading and non-blocking parsing and rendering #4397

Closed
@benbro

Description

@benbro

Hi,

I have large models > 20MB which blocks the browser when parsing and rendering them for several minutes.
In my case the 3D viewer is only part of the app and models are loaded in the middle of a session so showing a progressbar is not enough.

What part is the most expensive?

  • Parsing string to JSON
  • Parsing JSON object to three.js objects
  • Rendering

Are there plans to improve the browser responsiveness when loading large models?
Or maybe I'm missing existing features?

Some thoughts:

  • Break the JSON file to multiple chunks. Each file could be a separate geometry or the loader could load a large file with chunk encoding and parse and render geometries when it has enough data. (pdf.js does that).
  • Use a web worker to load and parse the data and pass it as a transferable object.
    I'm not sure if IE11 support this feature but FF and Chrome do. (pdf.js uses this technique).

Progressive loading of PDFs
mozilla/pdf.js#2719
Worker with transferable objects
mozilla/pdf.js#3904
http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions