improve column switching performance

This commit is contained in:
Nolan Lawson 2018-03-12 20:58:45 -07:00
parent 624020dd01
commit 8813694039
1 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,7 @@
<script> <script>
import { importTimeline } from '../../_utils/asyncModules' import { importTimeline } from '../../_utils/asyncModules'
import { store } from '../../_store/store' import { store } from '../../_store/store'
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask'
export default { export default {
oncreate() { oncreate() {
@ -25,7 +26,12 @@
}, },
store: () => store, store: () => store,
data: () => ({ data: () => ({
importTimeline: importTimeline() importTimeline: importTimeline().then(timeline => {
return new Promise((resolve) => {
// make column-switching more responsive by delaying this load
scheduleIdleTask(() => resolve(timeline))
})
})
}) })
} }
</script> </script>