Skip to content

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Jan 9, 2025

Motivation: performance and size improvements for single-threaded WASM

  • introduce FEATURE_SINGLE_THREAD define symbol
  • use Queue instead of ConcurrentQueue in single-threaded thread pool
  • make ThreadPoolTypedWorkItemQueue #if TARGET_WINDOWS and non-generic

- use Queue instead of ConcurrentQueue in single-threaded thread pool
- protect ConcurrentQueue ctor from trimming when used with `JsonSerializer.Deserialize`
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-VM-threading-mono size-reduction Issues impacting final app size primary for size sensitive workloads labels Jan 9, 2025
@pavelsavara pavelsavara added this to the 10.0.0 milestone Jan 9, 2025
@pavelsavara pavelsavara self-assigned this Jan 9, 2025
@pavelsavara pavelsavara changed the title [browser][ST] Use Queue instead of ConcurrentQueue in single-threaded thread pool [WASM][ST] Use Queue instead of ConcurrentQueue in single-threaded thread pool Jan 9, 2025
@pavelsavara pavelsavara marked this pull request as ready for review January 16, 2025 20:34
@pavelsavara pavelsavara changed the title [WASM][ST] Use Queue instead of ConcurrentQueue in single-threaded thread pool Use Queue instead of ConcurrentQueue in single-threaded thread pool Jan 20, 2025
@pavelsavara pavelsavara merged commit 8c4c381 into dotnet:main Jan 20, 2025
138 of 140 checks passed
@pavelsavara pavelsavara deleted the browser_trim_st_concurrent_queue branch January 20, 2025 10:45
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-VM-threading-mono size-reduction Issues impacting final app size primary for size sensitive workloads

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants