SShortSingh.
Back to feed

Rust file watcher cached 6.4M inodes at boot, bloating macOS app RAM to 25 GB

0
·8 views

Developers building a local-first macOS file indexer discovered their app was consuming roughly 25 GB of RAM and pinning a CPU core for ten minutes at every launch. The culprit was the notify-debouncer-full Rust crate's default FileIdMap cache, which walks the entire watch root to record file IDs for rename-event stitching — completely bypassing the app's ignore rules. Because the watcher was set to monitor the user's home directory, it stat-ed approximately 6.4 million files and allocated 54 million path entries, including caches and build folders the team had explicitly excluded. Switching the cache mode to NoCache dropped memory usage from 24.8 GB to 1.45 GB, at the cost of losing paired rename events. The team accepted that trade-off because their indexer is idempotent and already runs a reconcile pass that handles unpaired deletes and creates.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

PromptLedger v0.7 Adds Evaluation Runs and Regression Gates for Prompt Versioning

PromptLedger v0.7 has been released, introducing evaluation runs, metric comparisons, and policy-based regression gates to its prompt version management workflow. Previously, the tool could track prompt history and production labels but could not determine whether a newer prompt version actually performed better than its predecessor. The update allows external benchmark tools to record results — including accuracy, latency, and cost metrics — against specific prompt versions for later comparison. Users can compare metrics between two versions or labels and define gate policies that specify acceptable thresholds for regression in each metric. If a candidate version exceeds a defined regression limit, the gate command returns a non-zero exit code, enabling the check to be integrated into automated deployment pipelines.

0
ProgrammingDEV Community ·

MCP Standardizes AI Agent Tool Connections But Does Not Replace App Logic

Model Context Protocol (MCP) is gaining significant attention in AI development circles, but its actual function is narrower than many assume. MCP does not enhance an agent's intelligence or reasoning; instead, it standardizes how AI agents connect to and interact with external tools and services. Before MCP, developers building TypeScript-based AI systems had to write separate, inconsistent integrations for every API or tool they wanted an agent to use. MCP addresses this by providing a uniform connection layer between the agent runtime and external capabilities, similar to how HTTP standardized communication between web systems. However, critical concerns such as authorization, input validation, retry logic, and observability remain the responsibility of the application developer, not MCP.

0
ProgrammingDEV Community ·

n8n and MCP Serve Three Distinct Roles That Most Tutorials Conflate

The Model Context Protocol (MCP) can be integrated with n8n in three separate ways, each serving a different purpose. First, n8n can act as an MCP server, exposing existing workflows as callable tools for external AI agents like Claude or Cursor. Second, n8n can function as an MCP client, allowing its own AI Agent workflows to consume tools from external MCP servers. Third, a community-built server called czlonkowski/n8n-mcp helps coding agents draft new n8n workflows from plain-language descriptions, using knowledge of n8n's roughly 2,000 nodes. Confusion arises because most tutorials cover only one of these configurations without acknowledging the others, leading users to wire up the wrong setup.

0
ProgrammingDEV Community ·

Why Hybrid Cloud Networks May Be the Worst of Both Worlds

A forthcoming O'Reilly book co-authored by networking experts argues that hybrid cloud environments combine the costs and complexities of both on-premises and cloud infrastructure while delivering few of the benefits of either. The authors note that even as enterprise cloud adoption has grown, investment in on-premises networking has simultaneously increased rather than declined. This trend reflects a growing understanding among IT professionals of where cloud is appropriate and where it falls short, leading organizations to repatriate workloads back to their data centers. The resulting hybrid 'franken-network' spans both environments, creating layered operational and security challenges. The authors liken the situation to hybrid cars, which carry the drawbacks of both combustion and electric systems while offering only modest advantages.