Skip to content

Conversation

@itsmatteomanf
Copy link
Contributor

@itsmatteomanf itsmatteomanf commented Jun 27, 2023

Changes

Replaces the instance of setTimeout() in the runtime to use queueMicrotask(), to resolve limitations on Cloudflare Workers.

Fixes #7460.

Testing

No tests were added per #7460 (comment).

Docs

No changes in documentation is required, no user-facing changes nor different behaviour is expected.

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2023

🦋 Changeset detected

Latest commit: 3b51a0d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jun 27, 2023
@itsmatteomanf itsmatteomanf requested a review from ematipico June 27, 2023 13:51
@bluwy bluwy merged commit 2726098 into withastro:main Jun 27, 2023
@astrobot-houston astrobot-houston mentioned this pull request Jun 27, 2023
@itsmatteomanf
Copy link
Contributor Author

!bench

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

PR Benchmark

Memory

Elapsed time (s) Memory used (MB) Final memory (MB)
SSR build 4.58 90.39 129.92
Client build 0.15 0.02 129.64
Static generate 0.76 5.76 135.14

Render

Page Avg (ms) Stdev (ms) Max (ms)
/astro 5.32 5.53 47.37
/md 7.55 3.33 37.82
/mdx 211.76 38.23 351.02

Server stress

Avg Stdev Max
Latency 2379 ms 532.55 ms 4037 ms
Avg Stdev Min Total in 30s
Req/Sec 405.37 171.29 337 12.2k requests
Bytes/Sec 28.8 MB 12.2 MB 24 MB 864 MB read

Main Benchmark

Memory

Elapsed time (s) Memory used (MB) Final memory (MB)
SSR build 4.69 90.23 129.77
Client build 0.15 0.06 129.68
Static generate 0.77 5.98 135.18

Render

Page Avg (ms) Stdev (ms) Max (ms)
/astro 5.22 5.46 47.51
/md 7.54 3.15 35.77
/mdx 210.55 33.34 332.71

Server stress

Avg Stdev Max
Latency 2350.03 ms 566.25 ms 4173 ms
Avg Stdev Min Total in 30s
Req/Sec 410.17 149.93 332 12.3k requests
Bytes/Sec 29.2 MB 10.7 MB 23.6 MB 875 MB read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Over 10k setTimeout() on Route Rendering

3 participants