AdguardTeam / AdguardTeam/ExtendedCss

Use worker API to exec selector simultaneously

Open
#181 1 comment 0 reactions 1 assignee Claimed by @maximtop View on GitHub
Priority: P4
Dominant language
TypeScript
Stars
71
Forks
11
PR merge metrics
No merged PRs in 30d

Description

If a selector without non-standard CSS properties matches huge amount of elements, large amount of CPU and memory resources are required to check the non-standard CSS properties.
It means that checking process with non-standard CSS properties will take some times.

However, using [p-limit npm package](https://github.com/sindresorhus/p-limit) can execute a selector with non-standard CSS properties simultaneously according to `navigator.hardwareConcurrency` [^1].
It reduces the taking time to execute a selector to select the elements.

[^1]: Please note that some privacy protection features mock the property with a number lower than the actual number. (e.g., Brave web browser's fingerprinting blocking and Firefox's `privacy.resistFingerprinting` in `about:config`)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.