Skip to content

Commit fac1544

Browse files
Merge pull request #241 from preactjs/perf-improvements-3
Perf Improvements 3
2 parents 6a0bec2 + f0f62c8 commit fac1544

19 files changed

+2116
-1770
lines changed

.changeset/bright-ligers-jam.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"preact-render-to-string": major
3+
---
4+
5+
Improve performance by another 5-10% using `switch` and short-circuiting, and move pretty-printing from into `preact-render-to-string/jsx`.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
/npm-debug.log
44
.DS_Store
55
/src/preact-render-to-string-tests.d.ts
6-
/benchmarks/.v8.modern.js
6+
/benchmarks/.v8.mjs

benchmarks/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { h } from 'preact';
22
import Suite from 'benchmarkjs-pretty';
33
import renderToStringBaseline from './lib/render-to-string';
44
// import renderToString from '../src/index';
5-
import renderToString from '../dist/index.mjs';
5+
import renderToString from '../dist/index.module.js';
66
import TextApp from './text';
77
// import StackApp from './stack';
88
import { App as IsomorphicSearchResults } from './isomorphic-ui/search-results/index';

0 commit comments

Comments
 (0)