summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-10-03 17:02:02 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-03 17:02:02 -0400
commitc6ab0206cb68ee400203ce6126e429ac1efb67e3 (patch)
tree1c445336e5cf9e7f6ab1edc9e54100e4588926f5
parent906ac622cae7d751d7f9771935f336abb7e88746 (diff)
downloadastro-c6ab0206cb68ee400203ce6126e429ac1efb67e3.tar.gz
astro-c6ab0206cb68ee400203ce6126e429ac1efb67e3.tar.zst
astro-c6ab0206cb68ee400203ce6126e429ac1efb67e3.zip
Adds a better test for benchmarking (#4966)
* Rendering: speed up rendering of HTML chunks * Add a changeset * Remove the fix * remove the changeset
-rw-r--r--packages/astro/test/benchmark/simple/package.json3
-rw-r--r--packages/astro/test/benchmark/simple/src/pages/index.astro81
2 files changed, 77 insertions, 7 deletions
diff --git a/packages/astro/test/benchmark/simple/package.json b/packages/astro/test/benchmark/simple/package.json
index d54f76f90..bec29ab55 100644
--- a/packages/astro/test/benchmark/simple/package.json
+++ b/packages/astro/test/benchmark/simple/package.json
@@ -2,7 +2,8 @@
"name": "@benchmark/simple",
"scripts": {
"start": "node server.mjs",
- "build": "astro build"
+ "build": "astro build",
+ "dev": "astro dev"
},
"dependencies": {
"astro": "workspace:*",
diff --git a/packages/astro/test/benchmark/simple/src/pages/index.astro b/packages/astro/test/benchmark/simple/src/pages/index.astro
index 932ce3ea8..7e93d37a0 100644
--- a/packages/astro/test/benchmark/simple/src/pages/index.astro
+++ b/packages/astro/test/benchmark/simple/src/pages/index.astro
@@ -1,9 +1,78 @@
---
-import Layout from '../components/Layout.astro';
-const name = 'world';
+ const content = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
---
-<Layout title={`Index page`}>
- <h1>index page</h1>
- <h2>Hello {name}</h2>
-</Layout>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <meta name="viewport" content="width=device-width" />
+ <meta name="generator" content={Astro.generator} />
+ <title>Astro</title>
+ </head>
+ <body>
+ <h1>Astro</h1>
+ <div>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ <p>{content}</p>
+ </div>
+ </body>
+</html>