Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.77k forks source link

[Performance] Static assets are not compressed in production #49191

Open janicduplessis opened 6 days ago

janicduplessis commented 6 days ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


What performance issue do we need to solve?

When loading newdot in production, the static text assets (js, css, html, json, etc.) are not compressed. This leads to long loading time, expecially on slower networks.

For example when loading https://new.expensify.com we can observe in Safari devtools that no compression is done and the content is served as text/javascript for https://new.expensify.com/main-5c8169422a350d70ff13.bundle.js.

image

We can compare this with a request to a 3rd party library like appleid and see what it looks like when compressed.

image

If I compress this JS bundle file manually the size goes from 4.4mb to 1.2mb.

What is the impact of this on end-users?

App is slow to load initially on slower connections.

List any benchmarks that show the severity of the issue

Please also provide exact steps taken to collect metrics above if any so we can independently verify the results.

Proposed solution (if any)

Enable compression of static assets.

List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)

Collect network traces in Safari or Chrome devtools and check the size of various files.

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 9.0.33-4 Reproducible in staging?: Yes Reproducible in production?: Yes Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL: Issue reported by: @janicduplessis Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1726259564418389

View all open jobs on Upwork

melvin-bot[bot] commented 6 days ago

Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

melvin-bot[bot] commented 6 days ago

Current assignee @justinpersaud is eligible for the ring0 assigner, not assigning anyone new.

justinpersaud commented 3 days ago

Will look at soon.

justinpersaud commented 3 days ago

image

justinpersaud commented 3 days ago

It's not obvious to me why these aren't being served compressed so I opened a cloudflare ticket.

justinpersaud commented 10 hours ago

Having trouble getting a response from Cloudflare through our support ticket on this. I pinged our account team on this.