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

Fix regression in rendering strings #4967

Merged
merged 1 commit into from
Oct 3, 2022
Merged

Fix regression in rendering strings #4967

merged 1 commit into from
Oct 3, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Oct 3, 2022

Changes

  • This should ultimately fix the issues that came with 1.3.0
  • Was using instanceof to check if a string is an escaped string, but there is 2 instances of this module so instanceof is returning false negative.
    • This was likely happening for a long time but still working on accident.
  • In 1.3.0 I added the ability for the template to handle iterators. Since a string is an iterator it would iterate on each character in the string.
  • The result was that we were rendering 1 character at a time. Very slow!
  • Fixes Extremely slow text processing/rendering in components #4958
  • Fixes Hydration mismatch since 1.3.0 #4900

Testing

Benchmarks should show

Docs

N/A, bug fix.

@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2022

🦋 Changeset detected

Latest commit: 01240f4

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

@matthewp
Copy link
Contributor Author

matthewp commented Oct 3, 2022

!bench

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2022

Node: 14
PR: �[0m[1]�[0m 16k requests in 30.12s, 1.1 GB read
MAIN: �[0m[1]�[0m 16k requests in 30.11s, 1.08 GB read


Node: 16
PR: �[0m[1]�[0m 16k requests in 30.12s, 1.05 GB read
MAIN: �[0m[1]�[0m 15k requests in 30.08s, 999 MB read

@matthewp matthewp marked this pull request as draft October 3, 2022 21:12
@matthewp
Copy link
Contributor Author

matthewp commented Oct 3, 2022

Put it back to draft as this didn't produce the results I expected. It's possible/likely that the perf hit is dev-only. This benchmark is testing prod. But we should test both.

@matthewp
Copy link
Contributor Author

matthewp commented Oct 3, 2022

!preview perf-2

@matthewp
Copy link
Contributor Author

matthewp commented Oct 3, 2022

On 1.4.3:

<--- Last few GCs --->

[7193:0x120008000]    77994 ms: Mark-sweep 4054.6 (4134.7) -> 4039.4 (4135.4) MB, 1870.8 / 0.0 ms  (average mu = 0.111, current mu = 0.005) allocation failure scavenge might not succeed
[7193:0x120008000]    79912 ms: Mark-sweep 4056.3 (4136.4) -> 4041.1 (4137.2) MB, 1907.6 / 0.0 ms  (average mu = 0.060, current mu = 0.006) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x104da82dc node::Abort() [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 2: 0x104da8464 node::errors::TryCatchScope::~TryCatchScope() [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 3: 0x104ef7b90 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 4: 0x104ef7b24 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 5: 0x10507b23c v8::internal::Heap::GarbageCollectionReasonToString(v8::internal::GarbageCollectionReason) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 6: 0x10507e84c v8::internal::Heap::CollectSharedGarbage(v8::internal::GarbageCollectionReason) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 7: 0x10507ba04 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 8: 0x10507932c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
 9: 0x1050850a4 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
10: 0x105085138 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
11: 0x105057fcc v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
12: 0x1053900d0 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
13: 0x1056a474c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
14: 0x105702cc4 Builtins_StringIteratorPrototypeNext [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
15: 0x1056a3440 Builtins_AsyncFromSyncIteratorPrototypeNext [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
16: 0x109ceb208
17: 0x1056a0b78 Builtins_AsyncGeneratorResumeNext [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
18: 0x1056a0e94 Builtins_AsyncGeneratorPrototypeNext [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
19: 0x109c48c0c
20: 0x1056a0b78 Builtins_AsyncGeneratorResumeNext [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
21: 0x1056a0e94 Builtins_AsyncGeneratorPrototypeNext [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
22: 0x109c66254
23: 0x1056679d4 Builtins_AsyncFunctionAwaitResolveClosure [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
24: 0x1056ec878 Builtins_PromiseFulfillReactionJob [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
25: 0x105659db4 Builtins_RunMicrotasks [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
26: 0x1056360a4 Builtins_JSRunMicrotasksEntry [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
27: 0x1050079ec v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
28: 0x105007e20 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
29: 0x105007f0c v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
30: 0x10502ab48 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
31: 0x10502b3dc v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
32: 0x104f64a38 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
33: 0x104f64530 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
34: 0x104f63dbc v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
35: 0x1056a488c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
36: 0x109a9db38
37: 0x1056361cc Builtins_JSEntryTrampoline [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
38: 0x105635e64 Builtins_JSEntry [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
39: 0x105007a24 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
40: 0x1050070b8 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
41: 0x104f14548 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
42: 0x104cf5eec node::InternalCallbackScope::Close() [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
43: 0x104cf648c node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
44: 0x104d0b4c8 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
45: 0x104dc20dc node::(anonymous namespace)::Parser::OnStreamRead(long, uv_buf_t const&) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
46: 0x104e55ad8 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
47: 0x105623b44 uv__stream_io [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
48: 0x10562bc78 uv__io_poll [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
49: 0x10561a390 uv_run [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
50: 0x104cf6ccc node::SpinEventLoop(node::Environment*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
51: 0x104de16e0 node::NodeMainInstance::Run(int*, node::Environment*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
52: 0x104de13ac node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
53: 0x104d7b2e0 node::Start(int, char**) [/Users/matthew/.volta/tools/image/node/16.15.1/bin/node]
54: 0x10981d0f4

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2022

 > root@0.0.0 release /home/runner/work/astro/astro > pnpm run build && changeset publish "--tag" "next--perf-2" > root@0.0.0 build /home/runner/work/astro/astro > turbo run build --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter="@astrojs/*" �[2m• Packages in scope: @astrojs/alpinejs, @astrojs/cloudflare, @astrojs/deno, @astrojs/image, @astrojs/lit, @astrojs/markdown-component, @astrojs/markdown-remark, @astrojs/mdx, @astrojs/netlify, @astrojs/node, @astrojs/partytown, @astrojs/preact, @astrojs/prefetch, @astrojs/prism, @astrojs/react, @astrojs/rss, @astrojs/sitemap, @astrojs/solid-js, @astrojs/svelte, @astrojs/tailwind, @astrojs/telemetry, @astrojs/turbolinks, @astrojs/vercel, @astrojs/vue, @astrojs/webapi, astro, create-astro�[0m �[2m• Running�[0m �[2m�[1mbuild�[0m�[0m �[2min 27 packages�[0m �[2m• Remote computation caching enabled (experimental)�[0m �[35m@astrojs/webapi:build: �[0mcache hit, suppressing output �[2m694c9fb7d6fde548�[0m �[33m@astrojs/prism:build: �[0mcache hit, suppressing output �[2mb2dc21de120e9918�[0m �[34m@astrojs/telemetry:build: �[0mcache hit, suppressing output �[2m0a59a041a9024824�[0m �[36mcreate-astro:build: �[0mcache hit, suppressing output �[2m1d0a2047e5c1f915�[0m �[35m@astrojs/markdown-remark:build: �[0mcache hit, suppressing output �[2mc1bd6557a5ef4d7d�[0m �[32mastro:build: �[0mcache miss, executing �[2m8422ad3c04dec3ff�[0m �[32mastro:build: �[0m �[32mastro:build: �[0m> astro@0.0.0-perf-2-20221003212959 build /home/runner/work/astro/astro/packages/astro �[32mastro:build: �[0m> pnpm run prebuild && astro-scripts build "src/**/*.ts" && tsc �[32mastro:build: �[0m �[32mastro:build: �[0m �[32mastro:build: �[0m> astro@0.0.0-perf-2-20221003212959 prebuild /home/runner/work/astro/astro/packages/astro �[32mastro:build: �[0m> astro-scripts prebuild --to-string "src/runtime/server/astro-island.ts" "src/runtime/client/{idle,load,media,only,visible}.ts" �[32mastro:build: �[0m �[33m@astrojs/alpinejs:build: �[0mcache miss, executing �[2m3ce304e21f82f58d�[0m �[36m@astrojs/node:build: �[0mcache miss, executing �[2m6d69cad85f8c6a2a�[0m �[32m@astrojs/svelte:build: �[0mcache miss, executing �[2m9d4f6e79f2606534�[0m �[35m@astrojs/vercel:build: �[0mcache miss, executing �[2m1ea7f0e888ca1e9a�[0m �[32m@astrojs/lit:build: �[0mcache miss, executing �[2ma85381cbee239019�[0m �[33m@astrojs/deno:build: �[0mcache miss, executing �[2mb1b7754a8932df8a�[0m �[36m@astrojs/partytown:build: �[0mcache miss, executing �[2me97e7d8c41584324�[0m �[34m@astrojs/image:build: �[0mcache miss, executing �[2m66a7040e22a10ed5�[0m �[35m@astrojs/cloudflare:build: �[0mcache miss, executing �[2mb184ed0a3cbe7e4d�[0m �[34m@astrojs/netlify:build: �[0mcache miss, executing �[2mfdb99df3559a511a�[0m �[33m@astrojs/alpinejs:build: �[0m �[33m@astrojs/alpinejs:build: �[0m> @astrojs/alpinejs@0.1.2 build /home/runner/work/astro/astro/packages/integrations/alpinejs �[33m@astrojs/alpinejs:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[33m@astrojs/alpinejs:build: �[0m �[35m@astrojs/vercel:build: �[0m �[35m@astrojs/vercel:build: �[0m> @astrojs/vercel@2.1.0 build /home/runner/work/astro/astro/packages/integrations/vercel �[35m@astrojs/vercel:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[35m@astrojs/vercel:build: �[0m �[36m@astrojs/partytown:build: �[0m �[36m@astrojs/partytown:build: �[0m> @astrojs/partytown@1.0.0 build /home/runner/work/astro/astro/packages/integrations/partytown �[36m@astrojs/partytown:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/partytown:build: �[0m �[34m@astrojs/image:build: �[0m �[34m@astrojs/image:build: �[0m> @astrojs/image@0.9.1 build /home/runner/work/astro/astro/packages/integrations/image �[34m@astrojs/image:build: �[0m> astro-scripts build "src/**/*.ts" && tsc && pnpm run postbuild �[34m@astrojs/image:build: �[0m �[32m@astrojs/svelte:build: �[0m �[32m@astrojs/svelte:build: �[0m> @astrojs/svelte@1.0.1 build /home/runner/work/astro/astro/packages/integrations/svelte �[32m@astrojs/svelte:build: �[0m> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc �[32m@astrojs/svelte:build: �[0m �[36m@astrojs/node:build: �[0m �[36m@astrojs/node:build: �[0m> @astrojs/node@1.1.0 build /home/runner/work/astro/astro/packages/integrations/node �[36m@astrojs/node:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/node:build: �[0m �[35m@astrojs/cloudflare:build: �[0m �[35m@astrojs/cloudflare:build: �[0m> @astrojs/cloudflare@2.1.0 build /home/runner/work/astro/astro/packages/integrations/cloudflare �[35m@astrojs/cloudflare:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[35m@astrojs/cloudflare:build: �[0m �[32m@astrojs/lit:build: �[0m �[32m@astrojs/lit:build: �[0m> @astrojs/lit@1.0.1 build /home/runner/work/astro/astro/packages/integrations/lit �[32m@astrojs/lit:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/lit:build: �[0m �[33m@astrojs/deno:build: �[0m �[33m@astrojs/deno:build: �[0m> @astrojs/deno@1.1.0 build /home/runner/work/astro/astro/packages/integrations/deno �[33m@astrojs/deno:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[33m@astrojs/deno:build: �[0m �[34m@astrojs/netlify:build: �[0m �[34m@astrojs/netlify:build: �[0m> @astrojs/netlify@1.1.0 build /home/runner/work/astro/astro/packages/integrations/netlify �[34m@astrojs/netlify:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/netlify:build: �[0m �[33m@astrojs/vue:build: �[0mcache miss, executing �[2m83f54057b2d0d108�[0m �[34m@astrojs/preact:build: �[0mcache miss, executing �[2m583517b38b39999f�[0m �[36m@astrojs/tailwind:build: �[0mcache miss, executing �[2m1ae270e101c12720�[0m �[32m@astrojs/turbolinks:build: �[0mcache miss, executing �[2m39b407e65eb6c7e9�[0m �[33m@astrojs/prefetch:build: �[0mcache miss, executing �[2m25de4ea600cbc8be�[0m �[34m@astrojs/rss:build: �[0mcache miss, executing �[2mb414ca81e5d168c2�[0m �[36m@astrojs/solid-js:build: �[0mcache miss, executing �[2m7fc2125f6cad7198�[0m �[35m@astrojs/sitemap:build: �[0mcache miss, executing �[2mdf06183f489947ec�[0m �[32m@astrojs/mdx:build: �[0mcache miss, executing �[2m937aace7b1925cb9�[0m �[33m@astrojs/vue:build: �[0m �[33m@astrojs/vue:build: �[0m> @astrojs/vue@1.1.0 build /home/runner/work/astro/astro/packages/integrations/vue �[33m@astrojs/vue:build: �[0m> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc �[33m@astrojs/vue:build: �[0m �[34m@astrojs/preact:build: �[0m �[34m@astrojs/preact:build: �[0m> @astrojs/preact@1.1.1 build /home/runner/work/astro/astro/packages/integrations/preact �[34m@astrojs/preact:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/preact:build: �[0m �[36m@astrojs/tailwind:build: �[0m �[36m@astrojs/tailwind:build: �[0m> @astrojs/tailwind@2.0.2 build /home/runner/work/astro/astro/packages/integrations/tailwind �[36m@astrojs/tailwind:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/tailwind:build: �[0m �[33m@astrojs/prefetch:build: �[0m �[33m@astrojs/prefetch:build: �[0m> @astrojs/prefetch@0.0.7 build /home/runner/work/astro/astro/packages/integrations/prefetch �[33m@astrojs/prefetch:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[33m@astrojs/prefetch:build: �[0m �[32m@astrojs/turbolinks:build: �[0m �[32m@astrojs/turbolinks:build: �[0m> @astrojs/turbolinks@0.1.4 build /home/runner/work/astro/astro/packages/integrations/turbolinks �[32m@astrojs/turbolinks:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/turbolinks:build: �[0m �[34m@astrojs/rss:build: �[0m �[34m@astrojs/rss:build: �[0m> @astrojs/rss@1.0.2 build /home/runner/work/astro/astro/packages/astro-rss �[34m@astrojs/rss:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/rss:build: �[0m �[36m@astrojs/solid-js:build: �[0m �[36m@astrojs/solid-js:build: �[0m> @astrojs/solid-js@1.1.0 build /home/runner/work/astro/astro/packages/integrations/solid �[36m@astrojs/solid-js:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/solid-js:build: �[0m �[35m@astrojs/sitemap:build: �[0m �[35m@astrojs/sitemap:build: �[0m> @astrojs/sitemap@1.0.0 build /home/runner/work/astro/astro/packages/integrations/sitemap �[35m@astrojs/sitemap:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[35m@astrojs/sitemap:build: �[0m �[32m@astrojs/mdx:build: �[0m �[32m@astrojs/mdx:build: �[0m> @astrojs/mdx@0.11.4 build /home/runner/work/astro/astro/packages/integrations/mdx �[32m@astrojs/mdx:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/mdx:build: �[0m �[33m@astrojs/react:build: �[0mcache miss, executing �[2mc1f8a6e035e6851d�[0m �[33m@astrojs/react:build: �[0m �[33m@astrojs/react:build: �[0m> @astrojs/react@1.1.4 build /home/runner/work/astro/astro/packages/integrations/react �[33m@astrojs/react:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[33m@astrojs/react:build: �[0m �[34m@astrojs/image:build: �[0m �[34m@astrojs/image:build: �[0m> @astrojs/image@0.9.1 postbuild /home/runner/work/astro/astro/packages/integrations/image �[34m@astrojs/image:build: �[0m> astro-scripts copy "src/**/*.wasm" �[34m@astrojs/image:build: �[0m Tasks: 26 successful, 26 total Cached: 5 cached, 26 total Time: 1m2.309s 🦋 �[33mwarn�[39m �[31m===============================IMPORTANT!===============================�[39m 🦋 �[33mwarn�[39m Packages will be released under the next--perf-2 tag 🦋 �[33mwarn�[39m �[31m----------------------------------------------------------------------�[39m 🦋 �[36minfo�[39m npm info astro 🦋 �[36minfo�[39m npm info @astrojs/prism 🦋 �[36minfo�[39m npm info @astrojs/rss 🦋 �[36minfo�[39m npm info create-astro 🦋 �[36minfo�[39m npm info @astrojs/alpinejs 🦋 �[36minfo�[39m npm info @astrojs/cloudflare 🦋 �[36minfo�[39m npm info @astrojs/deno 🦋 �[36minfo�[39m npm info @astrojs/image 🦋 �[36minfo�[39m npm info @astrojs/lit 🦋 �[36minfo�[39m npm info @astrojs/mdx 🦋 �[36minfo�[39m npm info @astrojs/netlify 🦋 �[36minfo�[39m npm info @astrojs/node 🦋 �[36minfo�[39m npm info @astrojs/partytown 🦋 �[36minfo�[39m npm info @astrojs/preact 🦋 �[36minfo�[39m npm info @astrojs/prefetch 🦋 �[36minfo�[39m npm info @astrojs/react 🦋 �[36minfo�[39m npm info @astrojs/sitemap 🦋 �[36minfo�[39m npm info @astrojs/solid-js 🦋 �[36minfo�[39m npm info @astrojs/svelte 🦋 �[36minfo�[39m npm info @astrojs/tailwind 🦋 �[36minfo�[39m npm info @astrojs/turbolinks 🦋 �[36minfo�[39m npm info @astrojs/vercel 🦋 �[36minfo�[39m npm info @astrojs/vue 🦋 �[36minfo�[39m npm info @astrojs/markdown-component 🦋 �[36minfo�[39m npm info @astrojs/markdown-remark 🦋 �[36minfo�[39m npm info @astrojs/telemetry 🦋 �[36minfo�[39m npm info @astrojs/webapi 🦋 �[36minfo�[39m astro is being published because our local version (0.0.0-perf-2-20221003212959) has not been published on npm 🦋 �[33mwarn�[39m @astrojs/prism is not being published because version 1.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/rss is not being published because version 1.0.2 is already published on npm 🦋 �[33mwarn�[39m create-astro is not being published because version 1.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/alpinejs is not being published because version 0.1.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/cloudflare is not being published because version 2.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/deno is not being published because version 1.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/image is not being published because version 0.9.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/lit is not being published because version 1.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/mdx is not being published because version 0.11.4 is already published on npm 🦋 �[33mwarn�[39m @astrojs/netlify is not being published because version 1.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/node is not being published because version 1.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/partytown is not being published because version 1.0.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/preact is not being published because version 1.1.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/prefetch is not being published because version 0.0.7 is already published on npm 🦋 �[33mwarn�[39m @astrojs/react is not being published because version 1.1.4 is already published on npm 🦋 �[33mwarn�[39m @astrojs/sitemap is not being published because version 1.0.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/solid-js is not being published because version 1.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/svelte is not being published because version 1.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/tailwind is not being published because version 2.0.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/turbolinks is not being published because version 0.1.4 is already published on npm 🦋 �[33mwarn�[39m @astrojs/vercel is not being published because version 2.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/vue is not being published because version 1.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/markdown-component is not being published because version 1.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/markdown-remark is not being published because version 1.1.3 is already published on npm 🦋 �[33mwarn�[39m @astrojs/telemetry is not being published because version 1.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/webapi is not being published because version 1.1.0 is already published on npm 🦋 �[36minfo�[39m Publishing �[36m"astro"�[39m at �[32m"0.0.0-perf-2-20221003212959"�[39m 🦋 �[32msuccess�[39m packages published successfully: 🦋 astro@0.0.0-perf-2-20221003212959 🦋 Creating git tag... 🦋 New tag: astro@0.0.0-perf-2-20221003212959

@matthewp
Copy link
Contributor Author

matthewp commented Oct 3, 2022

1.4.3 crashes the dev server (output shown 2 comments above).

This is the results with this change:

Running 30s test @ http://localhost:3000
100 connections with 10 pipelining factor


┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬─────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%    │ Avg       │ Stdev    │ Max     │
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼─────────┤
│ Latency │ 760 ms │ 773 ms │ 802 ms │ 810 ms │ 767.55 ms │ 72.09 ms │ 1994 ms │
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴─────────┘
┌───────────┬─────────┬─────────┬───────┬─────────┬────────┬─────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%   │ 97.5%   │ Avg    │ Stdev   │ Min     │
├───────────┼─────────┼─────────┼───────┼─────────┼────────┼─────────┼─────────┤
│ Req/Sec   │ 1156    │ 1156    │ 1299  │ 1326    │ 1286.3 │ 35.69   │ 1156    │
├───────────┼─────────┼─────────┼───────┼─────────┼────────┼─────────┼─────────┤
│ Bytes/Sec │ 82.7 MB │ 82.7 MB │ 93 MB │ 94.9 MB │ 92 MB  │ 2.55 MB │ 82.7 MB │
└───────────┴─────────┴─────────┴───────┴─────────┴────────┴─────────┴─────────┘

Req/Bytes counts sampled once per second.
# of samples: 30

40k requests in 30.03s, 2.76 GB read

This is the results with 1.2.8 (similar)

Running 30s test @ http://localhost:3000
100 connections with 10 pipelining factor


┌─────────┬────────┬────────┬────────┬────────┬──────────┬──────────┬─────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%    │ Avg      │ Stdev    │ Max     │
├─────────┼────────┼────────┼────────┼────────┼──────────┼──────────┼─────────┤
│ Latency │ 608 ms │ 729 ms │ 793 ms │ 822 ms │ 729.5 ms │ 83.17 ms │ 1536 ms │
└─────────┴────────┴────────┴────────┴────────┴──────────┴──────────┴─────────┘
┌───────────┬─────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%  │ Avg     │ Stdev   │ Min     │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Req/Sec   │ 1125    │ 1125    │ 1367    │ 1430   │ 1254.34 │ 62.48   │ 1125    │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 80.5 MB │ 80.5 MB │ 97.8 MB │ 102 MB │ 96.9 MB │ 4.47 MB │ 80.5 MB │
└───────────┴─────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┘

Req/Bytes counts sampled once per second.
# of samples: 30

40k requests in 30.03s, 2.91 GB read

User testing

@matthewp matthewp marked this pull request as ready for review October 3, 2022 21:47
@matthewp matthewp merged commit e6a8810 into main Oct 3, 2022
@matthewp matthewp deleted the perf-fix-3 branch October 3, 2022 22:21
@astrobot-houston astrobot-houston mentioned this pull request Oct 3, 2022
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.

Extremely slow text processing/rendering in components Hydration mismatch since 1.3.0
2 participants