Skip to content

Batch tab-switch model updates with hold (and freeze)? #8461

@SimonHeybrock

Description

@SimonHeybrock

When using pn.Tabs(..., dynamic=True), switching tabs is obviously slower than with dynamic=False. However, I found that parts of this can be mitigated by adding pn.io.hold() (and optionally doc.models.freeze(), or the experimental freeze option to hold added in #8417).

We solved this by monkey patching (see https://github.com/scipp/esslivedata/pull/751/changes), but I think it might be a reasonable change to Panel itself? In our dashboard tab-switches now feel much snappier (obviously still not as good as with dynamic=False, but more usable).

I am happy to provide a PR, just wanted to get feedback first. One question is how to deal with the experimental freeze, as we likely would not want to use this internally unless we are confident it is always valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions