Database.enableOfflineSupport for gltfs?

does this support caching of gltf assets being loaded with the Asset Manager?

I guess @bghgary would be someone to ask?

I think so.

It does not seem to be any faster on loading, would there be any way in the console report to see if its coming from the network or the internal database?

You can see it in the “Network” pane of the Chrome console, but it must be opened before navigating to the page for the network operations to be caught. Here you will see if the file is retrieved from the cache or fetched from the network.

1 Like

Hmm, I must have set it up wrong because all of those reports were saying it was coming from AWS still when I checked that originally.

When u record network performance in chrome it turns off caching

How could I test this then @jeremy-coleman? I guess just turn off the network report and see if after the first load it actually does an “instant” load?

There is a checkbox in the chrome devtools where you can turn caching on or off. You can also emulate offline mode

I usually test a couple times with cache turned off, then turn on and compare. But, sometimes having devtools open in general causes the app to be really slow, especially if you’re using console.log , so can be a kind of schrodinger’s devtool problem . Also, emulating offline could be something to try out to confirm, even though it should just say 0ms load and (cache) next to the url. Also, if it shows up at all in the network tab, even as 0, I assume the runtime is recreating the object, so if the file is kind of big, parsing the file contents and flipping the coordinates might take longer than network anyway, which could explain why it seems slow regardless. Also one other thing to consider that I’m unsure about is that the database feature uses indexeddb to store the data instead of the network cache right. I would think that the url you see in the network tab should be changed to a local blob url if its grabbing the data out of idb, but I don’t know everything that it does - maybe will have a look look at source later.


Thank you, I was struggling with some other factors as well. But with this now I’ll be able to move forward, appreciate it thank you.