Skip to content

Conversation

@bhearsum
Copy link
Contributor

@bhearsum bhearsum commented Oct 24, 2025

Even with 3.14 free-threaded python, this is still a bit slower than multiprocessing on Linux, but it will allow us to start experimenting with it more, and may allow users on macOS and Windows to immediately see a speed-up.

I did some basic testing of this on macOS in taskgraph; I haven't tested it in the context of Gecko yet outside of Linux. My intention is to turn it off by default for Gecko by setting TASKGRAPH_SERIAL when the fork multiprocessing context is unavailable, and then get some more broad testing before it is enabled by default.

I'll also probably wait until #752 in completed before landing this. This should either let me drop the schema.py changes altogether (if msgspec is threadsafe), or if it's not, there will be a lot of conflicts to deal with, and I don't want to interfere with that work.

Voluptuous contains thread-unsafe code; work around this by locking before calling into it.
Even with 3.14 free-threaded python, this is still a bit slower than multiprocessing on Linux, but it will allow us to start experimenting with it more, and may allow users on macOS and Windows to immediately see a speed-up.
@abhishekmadan30
Copy link
Contributor

abhishekmadan30 commented Oct 24, 2025

Msgspec does support freethreading in python: https://github.com/jcrist/msgspec/pull/877/files

Initially thought we are planning to have both support for msgspec and voluptuous

@bhearsum
Copy link
Contributor Author

Msgspec does support freethreading in python: https://github.com/jcrist/msgspec/pull/877/files

Initially thought we are planning to have both support for msgspec and voluptuous

Oh, that's wonderful to hear about msgspec! Supporting both should be fine as far as I'm concerned for this work; it just means I'll need to rebase this after the schema work lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants