forked from cybrespace/pinafore
more perf improvements
This commit is contained in:
parent
96303583ad
commit
e65087e8d1
|
@ -153,8 +153,14 @@
|
|||
export default {
|
||||
oncreate() {
|
||||
this.set({inputText: store.get('currentInputTextInCompose')})
|
||||
const saveText = debounce(() => scheduleIdleTask(() => this.store.save()), 1000)
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
mark('autosize()')
|
||||
autosize(this.refs.textarea)
|
||||
stop('autosize()')
|
||||
})
|
||||
|
||||
const saveText = debounce(() => scheduleIdleTask(() => this.store.save()), 1000)
|
||||
this.observe('inputText', inputText => {
|
||||
let inputTextInCompose = this.store.get('inputTextInCompose')
|
||||
let currentInstance = this.store.get('currentInstance')
|
||||
|
@ -163,12 +169,6 @@
|
|||
saveText()
|
||||
}, {init: false})
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
mark('autosize()')
|
||||
autosize(this.refs.textarea)
|
||||
stop('autosize()')
|
||||
})
|
||||
|
||||
// Avoid input delays by updating these values after a rAF
|
||||
this.observe('inputLengthToDisplay', inputLengthToDisplay => {
|
||||
requestAnimationFrame(() => {
|
||||
|
|
|
@ -29,10 +29,12 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
requestAnimationFrame(() => {
|
||||
this.store.setForRealm({
|
||||
scrollHeight: node.scrollHeight,
|
||||
offsetHeight: node.offsetHeight
|
||||
})
|
||||
})
|
||||
}
|
||||
stop('onCreate VirtualListContainer')
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue