studio icon indicating copy to clipboard operation
studio copied to clipboard

fix(partially-fix-cold-start): add another component as layer for lazy loading

Open jerensl opened this issue 1 year ago • 11 comments

Using next/dynamic in server components that loading a client component is still including everything in server side rendering, and that client component doesn't know it needs to be split into another chunk in browser chunks.

Related: https://github.com/vercel/next.js/issues/49454#issuecomment-1830053413

Description I set up my own deployment here https://jolly-toffee-18b732.netlify.app and tested the results below Screenshot 2024-07-05 145715

Related issue(s) Partially fix #1118

jerensl avatar Jul 05 '24 07:07 jerensl

🦋 Changeset detected

Latest commit: dbb4efdb99e9ba8566063d810058abd260b690b8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
studio-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jul 05 '24 07:07 changeset-bot[bot]

Deploy Preview for studio-next ready!

Name Link
Latest commit dbb4efdb99e9ba8566063d810058abd260b690b8
Latest deploy log https://app.netlify.com/sites/studio-next/deploys/66e5311d64ccee0008c5db3d
Deploy Preview https://deploy-preview-1121--studio-next.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.

netlify[bot] avatar Jul 05 '24 07:07 netlify[bot]

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
Latest commit dbb4efdb99e9ba8566063d810058abd260b690b8
Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/66e5311ed7429600083aa455
Deploy Preview https://deploy-preview-1121--asyncapi-studio-design-system.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.

netlify[bot] avatar Jul 05 '24 07:07 netlify[bot]

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
Latest commit dbb4efdb99e9ba8566063d810058abd260b690b8
Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/66e5311d0fdc220008570b9f
Deploy Preview https://deploy-preview-1121--modest-rosalind-098b67.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.

netlify[bot] avatar Jul 05 '24 07:07 netlify[bot]

@jerensl you don't need to version the PR. all that is required is having a changeset file. the CI/CD pipeline will take care of versioning.

you can do that by running pnpm run changeset follow the instructions and the changeset file will be created. after that push the changeset file. that's it. you don't need to run pnpm run version-packages. it will be done by the pipeline.

KhudaDad414 avatar Jul 15 '24 14:07 KhudaDad414

@jerensl you don't need to version the PR. all that is required is having a changeset file. the CI/CD pipeline will take care of versioning.

you can do that by running pnpm run changeset follow the instructions and the changeset file will be created. after that push the changeset file. that's it. you don't need to run pnpm run version-packages. it will be done by the pipeline.

Thanks, I made the changes in the latest commit

jerensl avatar Jul 15 '24 16:07 jerensl

The sonar cloud status is not being reported and I don't see a comment from their bot eigther.

seems like Sergio has found a way to resolve this issue here: https://github.com/asyncapi/parser-js/issues/1033#issuecomment-2208958397

@derberg can you try doing disable/enable branch protection rule for sonar to see if it works for us?

EDIT: it seems like it doesn't work in other repos.

KhudaDad414 avatar Jul 23 '24 11:07 KhudaDad414

Updated

In NextJS 15, the cache is no longer default. I'm also testing it on my deployment https://jolly-toffee-18b732.netlify.app/, and the cache lives longer. Screenshot 2024-08-02 185501

I assume that NextJS tries to invalidate the cache when it is already being cached by Netlify and did the same cache as well this led to a cold start because it stale while revalidated always looking at the first cache-store.

So I will mark this as partially fixed, the rest will be done by updating to NextJS 15 when it's released, from now it's still on the release candidate

jerensl avatar Aug 02 '24 11:08 jerensl

Can Studio owners prioritize this issue?

cc @magicmatatjahu @KhudaDad414 @Amzani

smoya avatar Sep 09 '24 13:09 smoya

This pull request has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jan 13 '25 00:01 github-actions[bot]

@smoya @jerensl where was this left. I am seeing the approvals were already there.

Shurtu-gal avatar Apr 02 '25 20:04 Shurtu-gal

This pull request has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Aug 01 '25 00:08 github-actions[bot]