clean-and-green-philly icon indicating copy to clipboard operation
clean-and-green-philly copied to clipboard

Task: Improve performance of Find Properties page

Open CodeWritingCow opened this issue 1 year ago • 6 comments

Describe the task

Clean and Green Philly's Find Properties page has a Google Lighthouse performance score of 58/100 on mobile devices, and 60/100 on desktop devices. The page's Largest Contenful Paint is taking 6.3 seconds, and the website's logo (https://www.cleanandgreenphilly.org/logo.svg) appears to be causing this.

Reduce this page's image loading time and Improve the score to high 80s or low-to-mid 90s.

Acceptance Criteria

  • [ ] Reduce largest contentful paint time by loading images faster
  • [ ] Generate Lighthouse report for mobile devices, showing improvement in performance score
  • [ ] Post screenshots of results in this issue's comments section

Additional context

  • See #734 for details
  • For instructions on using Lighthouse, see https://developer.chrome.com/docs/lighthouse/overview

CodeWritingCow avatar Jul 30 '24 23:07 CodeWritingCow

Can I be assigned this please.

AZBL avatar Sep 25 '24 14:09 AZBL

assigned!

bacitracin avatar Sep 25 '24 14:09 bacitracin

@CodeWritingCow

I minified the logo svg, but it didn't much improve performance. Interestingly, when I ran the lighthouse report (which I did in an incognito browser with Chrome as well) I got significantly different results compared to #734. The largest contentful paint wasn't that slow to begin with for me, but the total blocking time was much worse, mostly due to main-thread-work, particularly script evaluation. Do you have suggestions for what to try next? For the record I only included screenshots of the report after minifying the logo (using vecta.io) because there was not much of a difference in the scores.

Find Properties Desktop Lighthouse Report

find-prooperties-desktop-after

Desktop Main Thread Work Details

find-properties-desktop-main-thread-work

Find Properties Mobile Lighthouse Report

find-properties-mobile-after

Mobile Main Thread Work Details

find-properties-mobile-main-thread-work

AZBL avatar Sep 26 '24 18:09 AZBL

@CodeWritingCow I just realized I was doing that all on my local host as opposed to the production site. I ran it again on the production site and the largest contentful paint was again slower, and the total blocking time was improved but still slow. Of course this is not including the minified logo svg, so I'm not sure how to go about comparing here.

AZBL avatar Sep 26 '24 19:09 AZBL

Hi @AZBL, what is your minified SVG's file size vs the current SVG on the production site? If there's a significant reduction without loss of image quality, can you open a PR to replace the SVG in prod with your minified version? Thanks!

We can run a Lighthouse audit and check if we'd improve performance by using the minified file in prod.

CodeWritingCow avatar Sep 29 '24 17:09 CodeWritingCow

Hi @AZBL, what is your minified SVG's file size vs the current SVG on the production site? If there's a significant reduction without loss of image quality, can you open a PR to replace the SVG in prod with your minified version? Thanks!

We can run a Lighthouse audit and check if we'd improve performance by using the minified file in prod.

Hi @CodeWritingCow the minified SVG was about 5447 bites and the original was 9447. I didn't notice any loss in quality. I will open the PR.

AZBL avatar Oct 02 '24 16:10 AZBL

This issue has been marked as stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 03 '24 00:11 github-actions[bot]

Will revisit performance later in 2025 after we've upgraded UI

nlebovits avatar Nov 27 '24 00:11 nlebovits