Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

philipp-spiess
Copy link
Contributor

@philipp-spiess philipp-spiess commented Dec 5, 2022

Fixes #44666

When opening large files, the file download can become quite slow and since we don't use any streaming APIs, the bottleneck is often the time to first byte. To improve the UX in the short term before we can add larger scale fixes to this problem, this PR tweaks the loading experience and adds different subtitles when loading exceeds specific thresholds (1sec, 3sec, 6sec, and 9sec). https://www.figma.com/file/5CgqjaXqrRhquTG6GB3YGd/FE-scale-audit%3A-loading-big-files-in-search-results-list-bogs-down-the-browser-%2344666-WIP?node-id=275%3A1628&t=TaPSg9bCLwiM1A1N-4

Figma: https://www.figma.com/file/5CgqjaXqrRhquTG6GB3YGd/FE-scale-audit%3A-loading-big-files-in-search-results-list-bogs-down-the-browser-%2344666-WIP?node-id=275%3A1628&t=TaPSg9bCLwiM1A1N-4

Test plan

You have to enable heavy network throttling to repro the 9 sec case (100kbps in my case):

loading.mov

App preview:

Check out the client app preview documentation to learn more.

@philipp-spiess philipp-spiess requested review from AlicjaSuska and a team December 5, 2022 14:40
@philipp-spiess philipp-spiess self-assigned this Dec 5, 2022
@cla-bot cla-bot bot added the cla-signed label Dec 5, 2022
@github-actions github-actions bot added the team/code-exploration Issues owned by the Code Exploration team label Dec 5, 2022
@sg-e2e-regression-test-bob
Copy link

sg-e2e-regression-test-bob commented Dec 5, 2022

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (0.00 kb) 0.01% (+0.98 kb) 0.01% (+0.98 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits a0cb49b and e70be36 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

Copy link
Contributor

@AlicjaSuska AlicjaSuska left a comment

Choose a reason for hiding this comment

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

Thank you for working on this @philipp-spiess Looks awesome!

Copy link
Contributor

@lrhacker lrhacker left a comment

Choose a reason for hiding this comment

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

Nice and simple improvement until bigger changes can be made. 👍

Co-authored-by: Laura Hacker <laura.hacker@sourcegraph.com>
@philipp-spiess philipp-spiess enabled auto-merge (squash) December 6, 2022 10:49
auto-merge was automatically disabled December 6, 2022 12:02

Merge could not be authorized

@philipp-spiess philipp-spiess enabled auto-merge (squash) December 6, 2022 14:26
@philipp-spiess philipp-spiess merged commit f65bc72 into main Dec 6, 2022
@philipp-spiess philipp-spiess deleted the ps/large-file-loading branch December 6, 2022 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed team/code-exploration Issues owned by the Code Exploration team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FE scale audit: loading big files in search results list bogs down the browser - strategic readiness
4 participants