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

Bad time to interactive on projects page #81

Open
KasperiP opened this issue Jan 10, 2023 · 2 comments
Open

Bad time to interactive on projects page #81

KasperiP opened this issue Jan 10, 2023 · 2 comments

Comments

@KasperiP
Copy link
Member

KasperiP commented Jan 10, 2023

There is very noticeable delay before you can interact with the site on projects page. This is mostly caused due QR-bike 3D model Javascript which blocks the main thread. For example for me its about 5 seconds before I can click any links on the page.

Google light house reports:
image
image

Without diving any diver to the cause of this issue and assuming it's the 3D model JS, getting the work from the main thread could solve the issue without removing the nice model. Partytown is one tool which could help by utilizing worker thread.

@Esinko
Copy link
Member

Esinko commented Jan 11, 2023

This is a known issue. However, your issue displayes the true extent of it well and I think we should deal with it asap.

I haven't written any of the code for the 3D-element. However, after a quick read it seems we use something called Spline to display the 3D-content and fallback to an image on "mobile" devices.
I am unsure if Partytown is a possible solution here, as we are talking about a React-component, please post examples of how we could utilize it here.

In my opinion, the best alternative here would be to somehow render the 3D-content in the background and display the "mobile" replacement image until the content has loaded. However, I have no idea how to achieve this. Perhaps @Eldemarkki could chime in?

@Esinko
Copy link
Member

Esinko commented Jan 11, 2023

Your test seems to be accurate as well. I ran Lighthouse myself and the results differ only a tiny bit. I'm using a laptop with a Ryzen 7 4700U mobile CPU:
image

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

No branches or pull requests

2 participants