perf: make the most of streamed rendering

This commit is contained in:
Harttle
2021-10-01 18:36:57 +08:00
committed by harttle
parent 4358c9630f
commit aea34418de
13 changed files with 65 additions and 71 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { stringify } from '../util/underscore'
export class StreamedEmitter {
public html: any = '';
public buffer = '';
public stream = new (require('stream').PassThrough)()
public write (html: any) {
this.stream.write(stringify(html))