Why is there a huge performance difference between embedding and using the Viewer API?

Hi all,

I have an interesting problem.
The same model, two different methods:

1: Embedding. Works fine.
2: Viewer API. Unusable due to the low frame rate.

Am I doing something wrong or is this just the way it works?

Thanks,
Ed

Sketchfab uses a few extra, undocumented init parameters that influence performance:

merge_materials: 1,
material_packing: 1,
graph_optimizer: 1,

I’d first add the graph optimizer and see if that helps.

2 Likes

I saw my project come crashing down… you just saved it.

The graph_optimizer: 1, did the trick. Thanks a lot Klaas. :pray:

@Sketchfab
I would say it’s about time someone documents this!

2 Likes

Embedding a resource, such as a video or image, directly into a web page can consume more resources and cause slower loading times compared to using the Viewer API. The Viewer API allows the resource to be loaded on-demand when needed, reducing the initial load time and resource consumption.