dom.maxHardwareConcurrency

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
noellarkin
Fanatic
Fanatic
Posts: 120
Joined: 2021-07-27, 04:20

dom.maxHardwareConcurrency

Post by noellarkin » 2024-06-08, 14:12

I came across this while reading about privacy.resistFingerprinting.
This used to be an about:config option in old FF that used to be set to 2 (at the time this must have been the most common number of logical threads in the processor?)
Has it been removed in Pale Moon?

User avatar
jobbautista9
Board Warrior
Board Warrior
Posts: 1244
Joined: 2020-11-03, 06:47
Location: Philippines

Re: dom.maxHardwareConcurrency

Post by jobbautista9 » 2024-06-08, 14:31

Have you checked for it in your PM's about:config first?
Image

Tired of creating stuff!

Avatar artwork by Shinki669: https://www.pixiv.net/artworks/113645617

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

User avatar
noellarkin
Fanatic
Fanatic
Posts: 120
Joined: 2021-07-27, 04:20

Re: dom.maxHardwareConcurrency

Post by noellarkin » 2024-06-08, 14:53

I did, it exists, but doesn't seem to have any effect. If I change it to 2, and then check from the browser console by running `window.navigator.hardwareConcurrency` I still get the system default.
This doesn't happen in Firefox. Changing it to 2 in FF and then running `window.navigator.hardwareConcurrency` gives me 2.

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 647
Joined: 2017-01-14, 02:40
Location: Philippines

Re: dom.maxHardwareConcurrency

Post by FranklinDM » 2024-06-08, 16:27

That preference isn't cached. You have to restart the browser for changes to take effect.

User avatar
Moonchild
Project founder
Project founder
Posts: 39699
Joined: 2011-08-28, 17:27
Location: Sweden

Re: dom.maxHardwareConcurrency

Post by Moonchild » 2024-06-08, 17:17

Please take note that this pref does influence how workers are handled. If you set it lower than your number of CPU cores/threads, then the browser will not use more than the max you set, reducing parallelism and efficiency. it is also clamped on the upper end by your hardware, so if you set it high, the actual number of cores/threads in the system will be used and reported.
"Sales hates anything that can't be turned into a confident sentence." - anonymous warehouse worker
"Why debate someone you fundamentally don't trust?" - Dario Amodei
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
noellarkin
Fanatic
Fanatic
Posts: 120
Joined: 2021-07-27, 04:20

Re: dom.maxHardwareConcurrency

Post by noellarkin » 2024-06-09, 08:10

FranklinDM wrote:
2024-06-08, 16:27
That preference isn't cached. You have to restart the browser for changes to take effect.
Thank you! I restarted the browser and it worked!