Skip to content

Commit

Permalink
benchmark for soft navigation (#109)
Browse files Browse the repository at this point in the history
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
jantimon and autofix-ci[bot] authored Jul 4, 2024
1 parent 2edfab3 commit ddc1b3d
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 83,165 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
with:
node-version: 20

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
version: 8.6.1
run_install: false

- name: Get pnpm store directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
version: 8.6.1
run_install: false
- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
version: 8.6.1
run_install: false
- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
with:
node-version: 20

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
version: 8.6.1
run_install: false

- name: Get pnpm store directory
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,14 @@ Thanks for merging our prs fixes in next.js and postcss ❤️

</details>

<details>
<summary>Experiments</summary>
Incomplete work in progress experiments to test the features and performance of next-yak:

- https://next-yak-benchmark.vercel.app/
- https://yacijs.vercel.app/
</details>

## Acknowledgments

Special thanks to the contributors and the inspiring projects that influenced next-yak:
Expand Down
4 changes: 3 additions & 1 deletion packages/benchmark/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ yarn-error.log*
.vercel

lighthouse/results
codspeed/dist
codspeed/dist

letters/*.tsx
9 changes: 2 additions & 7 deletions packages/benchmark/app/styled/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ export default function StyledLayout({
<style
dangerouslySetInnerHTML={{
__html: `
*, *::before, *::after { box-sizing: border-box; }
.box:nth-last-child(-n+1) { display: block; }
:not(:last-child):after { box-sizing: border-box; }
:not(:last-child):before { box-sizing: border-box; }
:not(:last-child) + :before { box-sizing: border-box; }
:not(:last-child) + :after { box-sizing: border-box; }
:not([foo]):not([bar]) { box-sizing: border-box; }
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
`,
}}
/>
Expand Down
14 changes: 12 additions & 2 deletions packages/benchmark/codspeed/index.bench.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ import { KanjiLetterComponentStyled } from "../letters/KanjiLetterComponent.styl

suite
.add("render KanjiLetterComponentStyled", () => {
renderToString(<KanjiLetterComponentStyled />).length;
try {
renderToString(<KanjiLetterComponentStyled />).length;
} catch (e) {
console.error(e);
throw e;
}
})
.add("render KanjiLetterComponentYak", () => {
renderToString(<KanjiLetterComponentYak />).length;
try {
renderToString(<KanjiLetterComponentYak />).length;
} catch (e) {
console.error(e);
throw e;
}
})
.on("cycle", function (event: Benchmark.Event) {
console.log(String(event.target));
Expand Down
Loading

0 comments on commit ddc1b3d

Please sign in to comment.