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

perf: run two JSON API fetches in parallel #170

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

JoshuaKGoldberg
Copy link
Owner

PR Checklist

Overview

Uses Promise.all and a new fetchAsJson helper to clean up the code a bit and run the two requests in parallel, rather than in series.

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Attention: 27 lines in your changes are missing coverage. Please review.

Comparison is base (2cb7789) 10.50% compared to head (ef00b26) 10.93%.

❗ Current head ef00b26 differs from pull request most recent head 660b265. Consider uploading reports for the commit 660b265 to get more accurate results

Files Patch % Lines
src/content-script.ts 0.00% 23 Missing ⚠️
src/fetchAsJson.ts 0.00% 3 Missing ⚠️
src/types.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #170      +/-   ##
==========================================
+ Coverage   10.50%   10.93%   +0.42%     
==========================================
  Files           5        6       +1     
  Lines         314      320       +6     
  Branches        8        8              
==========================================
+ Hits           33       35       +2     
- Misses        281      285       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review November 14, 2023 21:35
@JoshuaKGoldberg JoshuaKGoldberg merged commit 1c0f731 into main Nov 14, 2023
11 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the parallel-json-calls branch November 14, 2023 21:35
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.

⚡️ Performance: Parallelize API calls when possible
1 participant