Code Monkey home page Code Monkey logo

Comments (9)

gterzian avatar gterzian commented on June 11, 2024 2

But it seems it #31517 (comment) even more threads.

Yes that's correct, it uses a threadpool which will see threads created upfront, instead of spawning one thread for each image that is decoded.

I'm wondering if we could make whole net crate to share the same tokio runtime without manually spawning threads and thread pool.

We can use a single runtime for all async task, and a single core resource threadpool for the other non-async bacground work.

from servo.

wusyong avatar wusyong commented on June 11, 2024 1

@gterzian Could you add some good-first-issue or E-candidate-for-mentoring label?
This issue seems like a good chance for anyone who want to contribute.

from servo.

tannal avatar tannal commented on June 11, 2024 1

I would like to take this up.

from servo.

wusyong avatar wusyong commented on June 11, 2024

I saw your comment in zulip mentioned there's another PR dealing with thread spawning too. But it seems it created even more threads. I'm wondering if we could make whole net crate to share the same tokio runtime without manually spawning threads and thread pool.

from servo.

MunishMummadi avatar MunishMummadi commented on June 11, 2024

Hey @tannal what is your status with the issue. Can I join

from servo.

tannal avatar tannal commented on June 11, 2024

@MunishMummadi Yes you can.
The quick fix for this issue is done.

We can use a single runtime for all async task, and a single core resource threadpool for the other non-async bacground work.

You can open another pr to do this part if you are interested in this issue.

from servo.

gterzian avatar gterzian commented on June 11, 2024

a single core resource threadpool for the other non-async bacground work.

Yes indeed, this part would be good for a new PR @MunishMummadi

The idea is to use a single CoreResourceThreadPool in components/net, see for guidance this issue, which added a second one. You could make changes to have a single pool used where now two are used.

from servo.

MunishMummadi avatar MunishMummadi commented on June 11, 2024

Yes I would love to work on it @gterzian @tannal . Can I ask the bot to "assign me"!!!

from servo.

gterzian avatar gterzian commented on June 11, 2024

Actually, because the image cache runs in the script thread, not in the core resource thread, this is quite complicated and perhaps not a good idea. I withdraw my earlier conclusion.

from servo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.