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

News Site Next - Article Ids #447

Merged

Conversation

flashdesignory
Copy link
Contributor

This is an alternate solution for: #426

The reason to keep creating unique ids, is that it'll allow us to potentially opt into a complexity param (#430), which could append content by cloning the sections in the data file. This is only possible, if we don't hard-code list ids in the data file (which was the previous solution).

Here, I am just creating the unique ids once, when the data gets assigned to the app, instead of the currently used version that had issues (#422).

note: feel free to ignore the dist folder - that's just the generated build files

Crossbench - 10 iterations:

this pr

browser			Safari                    Firefox                Google Chrome
NewsSite-Nuxt  		61.2 ± 2.7%               67.6 ± 2.0%            61.51 ± 1.2%
NewsSite-Next  		58.80 ± 1.3%              74.42 ± 1.1%           68.72 ± 1.3%
Score          		16.75 ± 1.8%              14.14 ± 1.1%           15.41 ± 1.1%

main

browser			Safari                    Firefox                Google Chrome
NewsSite-Nuxt  		62.2 ± 2.6%               67.4 ± 1.7%            61.45 ± 1.2%
NewsSite-Next  		59.86 ± 1.4%              78.81 ± 1.2%           75.7 ± 2.1%
Score          		16.46 ± 1.8%              13.76 ± 1.0%           14.69 ± 1.5%

@flashdesignory flashdesignory force-pushed the feature/news-site-next-images branch from 7b0053f to 5f7b1f8 Compare December 9, 2024 14:16
@julienw julienw self-requested a review December 12, 2024 09:12
Copy link
Member

@rniwa rniwa left a comment

Choose a reason for hiding this comment

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

Seems sane to me.

Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me.

One question though: On my computer it looks like Chrome gets a higher boost than Firefox. Could that be because uuid was quite slower in Chrome? Is it interesting that we measure uuid computation? (maybe it's not interesting if it's not on the hot path for websites)

Thanks

@camillobruni
Copy link
Contributor

I did some more profiling... looks like we're doing fewer layout (Element::RecaclStyle went down from sampled 7.2s to 6.9s)
Screenshot 2025-01-07 at 12 02 55

Likely the brittle async measurements feeds into this diff as well.

@julienw julienw self-requested a review January 14, 2025 17:23
@julienw
Copy link
Contributor

julienw commented Jan 15, 2025

I did some more profiling... looks like we're doing fewer layout (Element::RecaclStyle went down from sampled 7.2s to 6.9s) Screenshot 2025-01-07 at 12 02 55

Likely the brittle async measurements feeds into this diff as well.

From this diff, it looks like the changes come from a scrollTo call. The only scrollTo call is in a useEffect:

pageRef?.current?.scrollTo({ top: 0, left: 0, behavior: "instant" });

So not sure what's happening here.

Also I don't see the same thing when I profile chrome locally. So to me this is still a mystery.

That said because the change makes a lot of sense I'm gonna approve it.

Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for webkit-speedometer ready!

Name Link
🔨 Latest commit 9e9dd02
🔍 Latest deploy log https://app.netlify.com/sites/webkit-speedometer/deploys/678fceef3aaae1000947159e
😎 Deploy Preview https://deploy-preview-447--webkit-speedometer.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.

@flashdesignory flashdesignory merged commit 2ff56c9 into WebKit:main Jan 21, 2025
8 checks passed
@flashdesignory flashdesignory deleted the feature/news-site-next-images branch January 21, 2025 16:52
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.

4 participants