mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Add benchmarks for text rendering
This commit is contained in:
parent
875f0ca1e5
commit
303124f1dd
@ -10,7 +10,6 @@ describe "editor.", ->
|
||||
window.rootView = new RootView
|
||||
window.rootView.attachToDom()
|
||||
|
||||
|
||||
rootView.width(1024)
|
||||
rootView.height(768)
|
||||
rootView.open() # open blank editor
|
||||
@ -60,6 +59,24 @@ describe "editor.", ->
|
||||
editor.insertText('"')
|
||||
editor.backspace()
|
||||
|
||||
describe "text-rendering.", ->
|
||||
beforeEach ->
|
||||
editor.scrollTop(200)
|
||||
|
||||
benchmark "resetDisplay", 20, ->
|
||||
editor.resetDisplay()
|
||||
|
||||
benchmark "htmlForScreenRows", 50, ->
|
||||
lastRow = editor.getLastScreenRow()
|
||||
editor.htmlForScreenRows(0, lastRow)
|
||||
|
||||
benchmark "htmlForScreenRows.htmlParsing", 20, ->
|
||||
lastRow = editor.getLastScreenRow()
|
||||
html = editor.htmlForScreenRows(0, lastRow)
|
||||
|
||||
div = document.createElement('div')
|
||||
div.innerHTML = html
|
||||
|
||||
describe "9000-line-file.", ->
|
||||
benchmark "opening.", 5, ->
|
||||
rootView.open('huge.js')
|
||||
|
Loading…
Reference in New Issue
Block a user