diff --git a/benchmark/react/cases/006-static-raw-text/index.tsx b/benchmark/react/cases/006-static-raw-text/index.tsx new file mode 100644 index 0000000000..20ccac5feb --- /dev/null +++ b/benchmark/react/cases/006-static-raw-text/index.tsx @@ -0,0 +1,23 @@ +// Copyright 2025 The Lynx Authors. All rights reserved. +// Licensed under the Apache License Version 2.0 that can be found in the +// LICENSE file in the root directory of this source tree. + +import { root } from '@lynx-js/react'; + +import { RunBenchmarkUntilHydrate } from '../../src/RunBenchmarkUntil.js'; + +runAfterLoadScript(() => { + root.render( + <> + {Array.from( + { length: 100 }, + () => ( + + Hello, ReactLynx 🎉! + + ), + )} + + , + ); +}); diff --git a/benchmark/react/lynx.config.js b/benchmark/react/lynx.config.js index 4a6701f53b..2a3d4f9ac8 100644 --- a/benchmark/react/lynx.config.js +++ b/benchmark/react/lynx.config.js @@ -45,6 +45,10 @@ export default defineConfig({ '005-load-script': [ './cases/005-load-script/index.tsx', ], + '006-static-raw-text': [ + './src/patchProfile.ts', + './cases/006-static-raw-text/index.tsx', + ], }, }, plugins: [ diff --git a/benchmark/react/package.json b/benchmark/react/package.json index 6986c0c11a..1bf7d8c132 100644 --- a/benchmark/react/package.json +++ b/benchmark/react/package.json @@ -10,6 +10,7 @@ "bench:003-hello-list": "benchx_cli run dist/003-hello-list.lynx.bundle --wait-for-id=stop-benchmark-true", "bench:004-various-update": "benchx_cli run dist/004-various-update.lynx.bundle --wait-for-id=stop-benchmark-true", "bench:005-load-script": "benchx_cli run dist/005-load-script.lynx.bundle", + "bench:006-static-raw-text": "benchx_cli run dist/006-static-raw-text.lynx.bundle --wait-for-id=stop-benchmark-true", "build": "rspeedy build", "dev": "rspeedy dev", "perfetto": "pnpm run --sequential --stream --aggregate-output '/^perfetto:.*/'", @@ -18,6 +19,7 @@ "perfetto:003-hello-list": "benchx_cli -o dist/003-hello-list.ptrace run dist/003-hello-list.lynx.bundle --wait-for-id=stop-benchmark-true", "perfetto:004-various-update": "benchx_cli -o dist/004-various-update.ptrace run dist/004-various-update.lynx.bundle --wait-for-id=stop-benchmark-true", "perfetto:005-load-script": "benchx_cli -o dist/005-load-script.ptrace run dist/005-load-script.lynx.bundle", + "perfetto:006-static-raw-text": "benchx_cli -o dist/006-static-raw-text.ptrace run dist/006-static-raw-text.lynx.bundle --wait-for-id=stop-benchmark-true", "test": "echo 'No tests specified'" }, "dependencies": { diff --git a/vitest.config.ts b/vitest.config.ts index fd82baa39b..a3a7c9d65c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ 'website/**', 'packages/react/transform/tests/__swc_snapshots__/**', - 'packages/rspeedy/create-rspeedy/template-*/**', + '**/tests/__swc_snapshots__/**', '.lintstagedrc.mjs', 'eslint.config.js',