Skip to content

Selector Performance #25

@saxamaphone69

Description

@saxamaphone69

https://blogs.windows.com/msedgedev/2023/01/17/the-truth-about-css-selector-performance/

After reading this article, ran it through the Edge DevTools.

Keep it mind that some of the selectors are actually from uBlock.

Screenshot 2023-01-18 105311
Screenshot 2023-01-18 105553
Screenshot 2023-01-18 105615

.stub ~ *
:where(b, strong, th, legend, .subject, .name)
.fileText .file-info:has(.fnswitch)
:where(button, input, option, select, textarea)

On page load seem to be the most expensive.

Other notable selectors are

::selection
*
::before
:disabled
:root
::after
::-webkit-scrollbar-thumb
::-webkit-scrollbar
.fileText .file-info a:has(> .fnswitch)
.globalMessage *
.catalog-post .postlnfo *
.pagelist .pages:not(.cataloglink) *
.catalog-post [class^="qmark"]
.fileText a
.file:hover .fileText
:root:not(.bottom-backlinks) .container.not(:empty)::before
#fourchanx-settings legend + *
.postNum > a:first-child
.catalog-post > .postInfo > :not(.subject):not(.nameBlock):not(.dateTime)
#qr .oekaki-bg > *
.stub ~ :not(.threadDivider)

Keep it mind this is with 4x CPU throttling, but faster CSS is faster CSS regardless of throttle.

Also to keep in mind is this appears to only really happen in threads with over 150 replies.

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