Geo-Web-Project / browser

An interface that uses geolocation to navigate/resolve content on the Geo Web.
MIT License
3 stars 8 forks source link

perf: Fetch raw blocks instead of entire DAG #56

Closed codynhat closed 1 year ago

codynhat commented 1 year ago

Description

Improves content loading performance by only fetching single raw blocks from an IPFS gateway instead of attempting to load the entire DAG.

Media objects are cached heavily in the browser. I suggest clearing your browser cache and local storage for better testing. This currently will attempt to retrieve content from IPFS first, and fallback to a public IPFS gateway after a timeout. A future task should be to improve loading from IPFS. The media gallery also seems to freeze when trying to load a new item. We should investigate some better ways to use model viewer in this scenarios (https://modelviewer.dev/examples/loading/).

Checklist:

Alert Reviewers

@tnrdd @gravenp

tnrdd commented 1 year ago

From my measurements on cache misses this shaved off ~500ms!

This network request is completely eliminated whole_dag and only this one remains single_block