Skip to content

Performance issues during panning/zooming #313

@Simon-Dirks

Description

@Simon-Dirks

Hi there,

I noticed that when I turn on the OCR layer in my Angular project, panning/zooming became choppy. When I turn the text overlay back off again, it's much smoother. At first I thought it might be related to my Angular configuration, but I've reproduced this in a basic vanilla JS project as well. I've created a repo with a video that shows what I mean: https://github.com/Simon-Dirks/mirador-performance, but will also include the video here (running in Firefox, M1 Pro MacBook):

textoverlay-performance-demo.mp4

My best bet at the moment is that it's not necessarily related to the plugin code, but simply that changing the SVG container's transform is a relatively heavy DOM/browser operation, especially when there are many text elements. I was thinking perhaps the number of transform updates could be reduced or debounced to improve performance. From what I saw from the plugin's code, however, there were already various fixes and hacks to focus on performance, so I was wondering if what I'm seeing is "normal"/expected behavior, or if perhaps I've misconfigured something.

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