Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: load activities data lazily to reduce bundle size #491

Closed
wants to merge 5 commits into from

Conversation

frostming
Copy link
Collaborator

Signed-off-by: Frost Ming [email protected]

@vercel
Copy link

vercel bot commented Sep 13, 2023

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

Name Status Preview Comments Updated (UTC)
running-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2023 11:54am

@yihong0618
Copy link
Owner

@frostming
image

@yihong0618
Copy link
Owner

yihong0618 commented Sep 14, 2023

May have some impact on user experience so, holding this.
@ben-29 @vlin

@vlin
Copy link
Collaborator

vlin commented Sep 18, 2023

The code is looking good! Async imports and the <Loading /> component are smart moves for UX.
But there is a catch - with the huge activities.json, before it finishes loading, the <Loading /> could end up looking like this:
screenshot

@yihong0618
Maybe our UI mate could mock up a skeleton screen or default loading state before data's trimmed. That'd let us polish the loading flow. Any chance we could break up the data in Python before it hits activities.json? That might help slim it down a bit.

@yihong0618
Copy link
Owner

The code is looking good! Async imports and the <Loading /> component are smart moves for UX. But there is a catch - with the huge activities.json, before it finishes loading, the <Loading /> could end up looking like this: screenshot

@yihong0618 Maybe our UI mate could mock up a skeleton screen or default loading state before data's trimmed. That'd let us polish the loading flow. Any chance we could break up the data in Python before it hits activities.json? That might help slim it down a bit.

make sense, let us move on this

@@ -32,6 +32,7 @@
"data:download:garmin": "python3 run_page/garmin_sync.py",
"data:analysis": "python3 run_page/gen_svg.py --from-db --type github --output assets/github.svg",
"build": "vite build",
"bund": "bunx --bun vite build",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frostming
bun is nice. I bet you stay on top of the latest front-end tech all the time.
We may use bun instead of nodejs in future.

@yihong0618 yihong0618 deleted the branch yihong0618:v2.0 September 23, 2023 10:00
@yihong0618 yihong0618 closed this Sep 23, 2023
@yihong0618 yihong0618 reopened this Sep 23, 2023
@yihong0618
Copy link
Owner

I am fool.....deleted v2.0 branch auto close this...

@frostming
Copy link
Collaborator Author

frostming commented Sep 25, 2023

Tried the master branch and it seems fast enough, i am going to close this PR if no other objections.

@frostming frostming closed this Sep 25, 2023
@frostming frostming deleted the feat/split-data branch September 25, 2023 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants