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

Reduce bundle size #906

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

Reduce bundle size #906

wants to merge 42 commits into from

Conversation

brenelz
Copy link
Collaborator

@brenelz brenelz commented Sep 28, 2024

  • I have read the Contribution guide
  • This PR references an issue (except for typos, broken links, or other minor problems)

Description(required)

Playing around a bit with bundle size and lighthouse scores on the docs. I wondered if I could improve things by keeping our syntax highligher(shiki) on the server. I will do a bit of testing to see if it actually improves things.

Im realizing its hard to test because of the netlify deploy preview drawer.
(Found a link without the drawer https://66f86aa87b3ff50008d7d297--solid-docs.netlify.app/)

Comparison

Before
image
image

After
image
image

Related issues & labels

Copy link

stackblitz bot commented Sep 28, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Sep 28, 2024

Deploy Preview for solid-docs ready!

Name Link
🔨 Latest commit cc816e2
🔍 Latest deploy log https://app.netlify.com/sites/solid-docs/deploys/66f86aa2cc04560008de9ff8
😎 Deploy Preview https://deploy-preview-906--solid-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brenelz brenelz marked this pull request as draft September 28, 2024 20:44
Copy link

netlify bot commented Sep 28, 2024

Deploy Preview for solid-docs ready!

Name Link
🔨 Latest commit 6ce4053
🔍 Latest deploy log https://app.netlify.com/sites/solid-docs/deploys/67453944ea9887000822ec65
😎 Deploy Preview https://deploy-preview-906--solid-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brenelz
Copy link
Collaborator Author

brenelz commented Oct 10, 2024

@atilafassina do you have any thoughts on this? Is it a good approach to reduce bundle size or do we want the highlighter on the client?

@atilafassina
Copy link
Member

atilafassina commented Oct 10, 2024

@atilafassina do you have any thoughts on this? Is it a good approach to reduce bundle size or do we want the highlighter on the client?

@brenelz
the highlighter on the client was a quick-and-dirty thing that was hacked around for the PoC stage which I never had time to get back to. So I totally appreciate the time and effort you're putting into this!!

@brenelz
Copy link
Collaborator Author

brenelz commented Oct 25, 2024

Just re commenting here for visibility. Is this worth investing some time in? I think its mostly there

@LadyBluenotes
Copy link
Member

Just re commenting here for visibility. Is this worth investing some time in? I think its mostly there

I'd say this is worth investing time in, especially if you have an idea of how to do it and it isn't too complicated

@atilafassina atilafassina added site improvement Something that improves the website functionality planned Features or content that are planned but not yet in progress. labels Nov 1, 2024
@brenelz brenelz changed the title WIP: Reduce bundle size Reduce bundle size Nov 24, 2024
@brenelz brenelz marked this pull request as ready for review November 24, 2024 03:03
Copy link
Member

@atilafassina atilafassina left a comment

Choose a reason for hiding this comment

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

small nit! 🏆

@@ -1,5 +1,6 @@

import { cache, createAsync } from "@solidjs/router";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { cache, createAsync } from "@solidjs/router";
import { query, createAsync } from "@solidjs/router";

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like we are on an older version of the router. Should i upgrade the router or leave it as is?

@@ -17,16 +18,17 @@ function Counter() {

export const snippetLines = counterTxt.split("\n");

const renderCode = async () => {
const renderCode = cache(async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const renderCode = cache(async () => {
const renderCode = query(async () => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planned Features or content that are planned but not yet in progress. site improvement Something that improves the website functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants