pln-planning-tools / Starmap

Roadmap Planning Tool
https://starmap.site
Other
20 stars 8 forks source link

Data fetching on client-side directly from GitHub API #325

Open AlexxNica opened 1 year ago

AlexxNica commented 1 year ago

Working on getting better loading times for roadmaps with suggestions from #33. This is still a draft and it needs some cleanup and syncing before moving to ready for review.

Changes

vercel[bot] commented 1 year ago

@AlexxNica is attempting to deploy a commit to the ipfs-ignite Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
starmaps ❌ Failed (Inspect) Feb 17, 2023 at 4:26AM (UTC)
whizzzkid commented 1 year ago

Some thoughts around following your approach on how it works and improves performance:

AlexxNica commented 1 year ago

Preliminary tests with cache disabled

Before

perf-test_before-annotated

After

perf-test_after-annotated

AlexxNica commented 1 year ago

Caching responses in service worker won’t be reliable either because responses from other origins would be marked as opaque responses which would would not allow us to compare the network responses and cached responses, which means every update is basically new update. We’ll also might approach the service worker storage limit, because each opaque response would be counted as 7.5mb response, so 63 calls, = 472.5mb of storage for one roadmap.

@whizzzkid are there other ways to cache responses from the client without the downside of having to store them as opaque responses?

What do you think of using standard HTTP caching mixed with the service worker in the background to check for changes/updates?

We could use conditional requests to check if the content has changed before calls.