Skip to content

CSS selectors performance issue #136

@dimateos

Description

@dimateos

When I drag a file, worse if it seats at the root of the vault, there is quite a noticeable lag.
I profiled it with css selector stats and seems like this plugin uses too much global selectors?

Not sure how it could it be improved, but probably should only be injecting CSS styles inside a editor tab, and not other kinds of editor leaves.

  • Regular selector starts: takes like 30ms (profiler with selector starts slows everything down tho)
Image
  • With this plugin: takes like 130ms (references to style-sheet-XXX-17 are linked to the plugin)
Image

So other plugins/themes/snippets also produce slowdowns due to CSS selections

  • e.g. in this testing environment the Excalidraw plugin increases the selector to 60ms

But I think it could be improved for this plugin

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions