On Thu, Dec 1, 2022 at 3:19 PM K. Moon <km...@chromium.org> wrote:Are you sure it's the CPU? The operating system (which OS are you using?) is responsible for scheduling processes in a fair manner, and I would expect it to try and maintain interactive responsiveness. However, if you're running out of memory (possible if you have a lot of workers spawning and using up memory), your system could be swapping, which is more likely to create severe performance degradation.This isn't really a chromium-dev question, though, more of a Chrome users question.--On Thu, Dec 1, 2022 at 10:24 AM Filip Wookeng <filipak...@gmail.com> wrote:Hello,Whenever I visit some site that nonoptimaly creates 10 worker threads, my PC just gets very slow and Chrome process just dies off. This is due to the fact that I have 4 cores or 2 cores and this site sometimes does very intensive CPU operations for whatever they are doing it. I am wondering can I somehow override core of Workers so that when new Worker is created it gets created under same thread that current JavaScript runs instead deploying new thread every time and causing mass chaos on my computer?Developers should be using Navigator.hardwareConcurrency check but most of them just statically creates N amount of worker threads that can do intensive CPU operation and it's not very good for me and my friends who browse this site very often.JavaScript code of creating Worker can be something like :
const worker = new Worker("worker.js");worker.onmessage = (msg) => { output.textContent = `Result: ${msg.data}`; };Or worker.js can also be a blob previously defined.More information how you can create Worker can be found here https://developer.mozilla.org/en-US/docs/Web/API/Worker--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/eb0ead90-8a5b-4ad4-a5c4-4f0d017f2d74n%40chromium.org.
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACwGi-7qG1r8fhL3H%2BcORpvTiGWHRmx44xM3Q9njvT3uxpVkRQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/eb0ead90-8a5b-4ad4-a5c4-4f0d017f2d74n%40chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/eb0ead90-8a5b-4ad4-a5c4-4f0d017f2d74n%40chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACwGi-7qG1r8fhL3H%2BcORpvTiGWHRmx44xM3Q9njvT3uxpVkRQ%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/tr-_us7ULGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/539228ac-f2d8-45b0-9597-f2eeaaa218een%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/eb0ead90-8a5b-4ad4-a5c4-4f0d017f2d74n%40chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACwGi-7qG1r8fhL3H%2BcORpvTiGWHRmx44xM3Q9njvT3uxpVkRQ%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/tr-_us7ULGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/539228ac-f2d8-45b0-9597-f2eeaaa218een%40chromium.org.
--Bruce Dawson, he/him
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/eb0ead90-8a5b-4ad4-a5c4-4f0d017f2d74n%40chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACwGi-7qG1r8fhL3H%2BcORpvTiGWHRmx44xM3Q9njvT3uxpVkRQ%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/tr-_us7ULGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/539228ac-f2d8-45b0-9597-f2eeaaa218een%40chromium.org.
--Bruce Dawson, he/him