jazz icon indicating copy to clipboard operation
jazz copied to clipboard

fix: replace setTimeout with setImmediate/queueMicrotask in IncomingMessagesQueue

Open gdorsi opened this issue 1 month ago • 2 comments

We've noticed when the sync server is busy processing incoming messages, the CPU usage is quite low.

I think that the reason is that setTimeout is too aggressive as a way to do collaborative scheduling, and moving to using setImmediate when available or queueMicrotask when not.

Doing some tests to see the effect.

gdorsi avatar Nov 19 '25 15:11 gdorsi

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
design-system Ready Ready Preview Comment Nov 19, 2025 3:59pm
file-upload-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
form-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
gcmp-homepage Ready Ready Preview Comment Nov 19, 2025 3:59pm
image-upload-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-chat Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-chat-1 Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-chat-2 Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-filestream Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-image-upload Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-inspector Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-multi-cursors Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-nextjs Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-organization Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-paper-scissors Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-richtext Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-richtext-prosekit Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-richtext-tiptap Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-todo Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-vector-search Ready Ready Preview Comment Nov 19, 2025 3:59pm
jazz-version-history Ready Ready Preview Comment Nov 19, 2025 3:59pm
music-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
passkey-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
passphrase-auth-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
quint-ui Ready Ready Preview Comment Nov 19, 2025 3:59pm
reactions-demo Ready Ready Preview Comment Nov 19, 2025 3:59pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
jazz-homepage Ignored Ignored Nov 19, 2025 3:59pm

vercel[bot] avatar Nov 19 '25 15:11 vercel[bot]

Jazz pre-release

Packages:

{
    "cojson-core-napi": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-wasm": "https://pkg.pr.new/garden-co/jazz/cojson-core-wasm@957627889fc851d499afe1ab272133da3e7e087d",
    "jazz-tools-codemod-0-18": "https://pkg.pr.new/garden-co/jazz/jazz-tools-codemod-0-18@957627889fc851d499afe1ab272133da3e7e087d",
    "jazz-tools-codemod-0-19": "https://pkg.pr.new/garden-co/jazz/jazz-tools-codemod-0-19@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson": "https://pkg.pr.new/garden-co/jazz/cojson@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-storage-do-sqlite": "https://pkg.pr.new/garden-co/jazz/cojson-storage-do-sqlite@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-storage-indexeddb": "https://pkg.pr.new/garden-co/jazz/cojson-storage-indexeddb@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-storage-sqlite": "https://pkg.pr.new/garden-co/jazz/cojson-storage-sqlite@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-transport-ws": "https://pkg.pr.new/garden-co/jazz/cojson-transport-ws@957627889fc851d499afe1ab272133da3e7e087d",
    "community-jazz-vue": "https://pkg.pr.new/garden-co/jazz/community-jazz-vue@957627889fc851d499afe1ab272133da3e7e087d",
    "create-jazz-app": "https://pkg.pr.new/garden-co/jazz/create-jazz-app@957627889fc851d499afe1ab272133da3e7e087d",
    "cursor-docs": "https://pkg.pr.new/garden-co/jazz/cursor-docs@957627889fc851d499afe1ab272133da3e7e087d",
    "hash-slash": "https://pkg.pr.new/garden-co/jazz/hash-slash@957627889fc851d499afe1ab272133da3e7e087d",
    "jazz-run": "https://pkg.pr.new/garden-co/jazz/jazz-run@957627889fc851d499afe1ab272133da3e7e087d",
    "jazz-tools": "https://pkg.pr.new/garden-co/jazz/jazz-tools@957627889fc851d499afe1ab272133da3e7e087d",
    "jazz-webhook": "https://pkg.pr.new/garden-co/jazz/jazz-webhook@957627889fc851d499afe1ab272133da3e7e087d",
    "quint-ui": "https://pkg.pr.new/garden-co/jazz/quint-ui@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-darwin-arm64": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-darwin-arm64@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-darwin-x64": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-darwin-x64@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-linux-arm-gnueabihf": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-linux-arm-gnueabihf@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-linux-arm64-gnu": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-linux-arm64-gnu@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-linux-arm64-musl": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-linux-arm64-musl@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-linux-x64-gnu": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-linux-x64-gnu@957627889fc851d499afe1ab272133da3e7e087d",
    "cojson-core-napi-linux-x64-musl": "https://pkg.pr.new/garden-co/jazz/cojson-core-napi-linux-x64-musl@957627889fc851d499afe1ab272133da3e7e087d"
}

View Commit

github-actions[bot] avatar Nov 19 '25 16:11 github-actions[bot]