Skip to content

Improve performances when updating color markers. #116

@abe33

Description

@abe33

I'm looking for some way to improve Pigments updates and I would like to gather suggestions about the various strategy available.

For the use case, there's the color parser specs, with Pigments enabled it looks like this:

color parser specs

On beta, when scrolling in parts of the buffer with a huge marker density, the timeline looks like this:

timeline

As you can see, the update of the markers takes almost 80ms (sometime even 100ms).

Currently, I'm using a pool of custom elements that are kept in the DOM and receive a ColorMarker as model during the update (only if when they go from an unused state to a used one) and generates their inner content from that (a bunch of regions divs mostly based on the way highlight markers works).

It appears that beyond DOM manipulation inside a color marker view, one costly operation is the computation of the screen coordinates of the underlying buffer markers:

timeline details

I'm also wondering if using a tile-based strategy or a custom marker layer could be of some help here.

Any thought?

cc/ @nathansobo @as-cii

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions