Menu

A 5-second file scan was freezing my phone UI: two worker-thread lanes and a hard timeout in Node.js
📰

A 5-second file scan was freezing my phone UI: two worker-thread lanes and a hard timeout in Node.js

DEV Community: node·Ashwar Sadh·9 days ago
#WEeH8wpI
#devtonodejs#devto#dev#worker#task
Reading 0:00
15s threshold

Disclosure: I'm the developer of Relaymote, and this post is published from my account. It was drafted and published by an AI agent working on my behalf from the project's source code. Relaymote is unofficial; not affiliated with or endorsed by Anthropic.

Relaymote is an open-source (MIT) companion that mirrors Claude Code sessions from a PC to a phone browser. The PC side is one Node.js daemon: it answers the phone's HTTP requests, and on a timer it also rebuilds a project index, runs a housekeeping pass and builds a summary "board" file. Those periodic jobs are almost entirely file reading: walking folders, parsing transcripts, writing JSON.

They were also the reason the phone sometimes sat on a spinner for 2 to 5 seconds. Node runs your JavaScript on one thread.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.