Skip to content

Virtualize logbook#4450

Merged
bramkragten merged 3 commits into
devfrom
virutual-logbook
Jan 12, 2020
Merged

Virtualize logbook#4450
bramkragten merged 3 commits into
devfrom
virutual-logbook

Conversation

@bramkragten
Copy link
Copy Markdown
Member

@bramkragten bramkragten commented Jan 11, 2020

By virtualizing the logbook the initial rendering is way faster.
Where on large amounts of entries the rendering could take > 30 seconds it is now instant.

Fixes #3762

Before: https://cdn.discordapp.com/attachments/505438107290566656/664841842671484929/old-logbook.mp4
After: https://cdn.discordapp.com/attachments/505438107290566656/664841888439730176/new-logbook.mp4

@bramkragten bramkragten mentioned this pull request Jan 11, 2020
2 tasks
Comment thread src/panels/logbook/ha-logbook.ts Outdated
Copy link
Copy Markdown
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic!

Comment thread src/panels/logbook/ha-logbook.ts Outdated
}

protected render(): TemplateResult | void {
if (!this.entries.length) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!this.entries?.length) {
Don't forget 😃

This was needed on my system at least

@bramkragten bramkragten merged commit 58ad949 into dev Jan 12, 2020
@delete-merged-branch delete-merged-branch Bot deleted the virutual-logbook branch January 12, 2020 12:00
@lock lock Bot locked and limited conversation to collaborators Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logbook takes ages to load and makes page unresponsive

4 participants