Skip to content

[Performance] improve atom.tooltips.add #307

@aminya

Description

@aminya

You would be surprised if you know that most of the time spent for creating the buttons, is spent in adding the tooltips to them! We might want to write a faster version of the original
https://github.com/suda/tool-bar/blob/937f75719a1002af5b207c073b6e45dd82617f44/lib/items/tool-bar-button-view.js#L121

https://github.com/atom/atom/blob/e4b9c1e0815c5c07514a0649e7ebb9b5226a2931/src/tooltip-manager.js#L113-L181

For 30 buttons, this becomes ~6ms.

Details

image

Which is almost the same as the whole time spent on the buttons:

Details

image

I am going to port the function to our package and see if I can write a faster version.

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