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
+2 -6
View File
@@ -2,13 +2,9 @@ import { stringify } from '../util/underscore'
import { Emitter } from './emitter'
export class SimpleEmitter implements Emitter {
public html: any = '';
public buffer = '';
public write (html: any) {
this.html += stringify(html)
}
public end () {
return this.html
this.buffer += stringify(html)
}
}