department-of-veterans-affairs / next-build

Front-end templating, build, and deploy for VA.gov CMS content.
Creative Commons Zero v1.0 Universal
9 stars 5 forks source link

Next Build Lighthouse Testing #608

Closed mreed101 closed 1 month ago

mreed101 commented 1 month ago

Description

We would like to have a better understanding of any optimization improvements when moving from content-build to next-build. The goal of this ticket is to use lighthouse testing to evaluate the performance between identical pages created by nextjs(next-build) and metalsmith(content-build).

Requirements

All pages tested should be noted in this ticket. Data comparison should be done between the same routes

Pages https://dev.va.gov/detroit-health-care/events/70531/ https://dev.va.gov/chillicothe-health-care/events/70560/ https://dev.va.gov/dayton-health-care/events/70576/ https://dev.va.gov/birmingham-health-care/events/70581/ https://dev.va.gov/birmingham-health-care/events/69409/

https://dev.va.gov/poplar-bluff-health-care/events https://dev.va.gov/sioux-falls-health-care/events https://dev.va.gov/altoona-health-care/events https://dev.va.gov/coatesville-health-care/events https://dev.va.gov/outreach-and-events/events

Acceptance Criteria

JeffKeeneVAGov commented 1 month ago

I am assuming a better lighthouse score with Nextjs. I would like to see the Audit findings for each to see if the nextjs addressed any audit findings from the Metalsmith build. It would also be nice to see if the files/network calls were reduced as far as loading js files/modules.

nfpappas-oddball commented 1 month ago

even-70531-cb.pdf even-70560-cb.pdf event-70576-cb.pdf event-70581-cb.pdf even-69409-cb.pdf

Base reports from content build

timcosgrove commented 1 month ago

My tests for content-build for these URLs:

timcosgrove_lighthouse_cb.zip

nfpappas-oddball commented 1 month ago

Attached is my final testing files. Here is a brief summary of the desktop pages In bold are improvements in italics is degradation

  1. Altoona improved from 79 to 83
  2. coatesvill improved from 56 to 66
  3. sious falls degraded from 65 to 63
  4. event 69409 degraded from 89 to 82
  5. event 70531 improved from 89 to 92
  6. event 70560 improved from 75 to 89
  7. event 70576 improved from 94 to 97
  8. event 70581 degraded from 90 to 89

Observation: it looks for the most part that we show improvement using next-build pages. Also looking at the images side by side, it looks like next build , on average , formats images differently.

Mobile summary:

  1. altoona improved from 52 to 53
  2. coatesvill improved from 29 to 31
  3. event 69409 showed no change
  4. event 70531 improved from 60 to 75
  5. event 70560 improved from 57 to 72
  6. event 70576 improved from 76 to 90
  7. event 70581 degraded from 69 to 59
  8. outreach listings improved from 54 to 55
  9. sious falls degraded from 35 to 32

Observations: some of the page dom looks slightly different in terms of elements. For the most part it looks like we improved page loads. Pages also looked better in next on mobile.

Nick_Lighthouse.zip

mreed101 commented 1 month ago

Adding lighthouse test for content build

jr_lighthouse_content_build.zip

mreed101 commented 1 month ago

jr_lighthouse_next_build.zip

Conclusion from reports.

Content Build tends to beat Next Build in SEO due to 2 missing meta tags.

Next Build is in fact faster than Content Build by roughly 20%.

Conclusion:

timcosgrove commented 1 month ago

Next Build counterpart to the Content Build tests from last week.

next-lighthouse.zip

mreed101 commented 1 month ago

NextJS Performance Takeaways

Areas to Improve

JeffKeeneVAGov commented 1 month ago

Can I have any numbers that show the difference? Avg improvement of LCP etc...

nevermind i think I cna piece together stuff from above

mreed101 commented 1 month ago

First Contentful Paint times

Content Build (CB) vs Next Build (NB). The number to the left represents the event id

This give us an average increase of roughly 19.1%

Static Page Index Sizes

When looking at the compressed files that both nextjs (NB) and metal smith (CB) creates, we can see that Next Build files are significantly smaller.

For the same index page of event 44988 we get the following file sizes

An almost 80% reduction

Image

nfpappas-oddball commented 1 month ago

lighthouseReports-nick.zip Here are the results from my content build staging numbers