Skip to content

Advice Overall On Roadmap #993

@anthony-maio

Description

@anthony-maio

Checked for Existing Issues?

  • Yes, I have checked existing issues and cannot find one related to this.

Software

Desktop Application

Operating System / Platform

Windows

Your Pieces OS Version

11

Early Access Program

  • Yes, this is related to an Early Access Program feature.

Kindly describe the bug and include as much detail as possible on what you were doing so we can reproduce the bug.

As a Senior Software Engineer with 20 years of experience, I initially approached this product as a potential solution for managing high-volume context switching across multiple projects. However, after extensive testing on a high-end workstation (i9-13900KF, 64GB RAM, RTX 4080 + 2x3090), I encountered severe stability issues that degraded my system's performance to the point of usability failure.

Below is a detailed breakdown of the architectural flaws I observed, along with constructive feedback on product direction and system design.

1. Product Direction: Feature Bloat vs. Core Utility

The current marketing positioning as a "Developer Tool" for snippets and drive storage feels misaligned with the actual pain points of senior engineers.

  • The "Clipboard Manager" Trap: Marketing an "AI-powered clipboard manager" undersells the potential value. Tools like Claude Code or existing snippet managers already saturate this space.
  • The Real Value Proposition: The "Killer App" here is not snippet storage; it is Context Management. For a developer juggling 15+ active projects, the ability to automatically track and recall what I was working on is invaluable.
  • Implementation Friction: The onboarding experience is fragmented. The VS Code extension prompts for a core platform installation but leads to a documentation loop rather than a seamless install.

2. Performance & Stability: Resource Contention

The application exhibits behavior characteristic of unmanaged resource contention, effectively acting as a denial-of-service on the local machine.

  • Hardware Impact: On a machine specifically built for heavy AI/ML workloads, the application caused system-wide lag and instability so severe I initially diagnosed it as a CPU hardware failure.
  • Stability: In contrast to a compiled Rust/C# implementation, the current Python-heavy architecture struggles to maintain stability under load, leading to lockups and dropped data.

3. Architectural Deep Dive: The Data Layer (Couchbase Lite)

The decision to use Couchbase Lite (CBL) as the primary persistence layer on a desktop application is the root cause of the performance issues.

  • Architectural Mismatch: CBL is designed for mobile devices (iOS/Android) to handle offline-first sync over unstable networks. It is not optimized for high-frequency, high-throughput desktop telemetry.
  • The Serialization Tax: Every system event (mouse move, focus switch) appears to be marshaled from the OS hook -> Python -> JSON Document -> CBL Native Interop -> Disk. This pipeline incurs massive CPU overhead for data that should be trivial to store.
  • Memory Usage: I observed memory consumption exceeding 7GB. This suggests the native C++ library backing CBL is struggling with object graph retention or replicator overhead.
  • Data Model Friction: Telemetry is Time-Series Data, not Document Data. Forcing linear event logs into a NoSQL document store requires aggressive indexing and compaction (MVCC), creating I/O jitter that manifests as IDE lag.
  • Inference: It appears CBL was chosen to simplify backend synchronization (Sync Gateway) at the expense of local runtime performance. This is a "Sync-First" optimization that penalizes the user's immediate experience.

4. System Design: Process & Language Choices

The application attempts to run OS-level hooks, API servers, and AI workloads within a monolithic or tightly coupled architecture that fights the operating system rather than working with it.

  • Language Choice for OS Hooks: Using Python for low-level Windows hooks (Win32 API) is inefficient due to the GIL and lack of first-class OS primitives.
  • The "Monolith" Problem: Running global hooks (Keyboard/Mouse) in the same process loop as heavy AI summarization or data persistence is dangerous. If the AI worker stalls or GC pauses, the OS hook callback times out, breaking the clipboard chain or locking the input queue.
  • Local Microservices Overhead: While a local HTTP/Websocket architecture is flexible, it introduces unnecessary latency for local IPC.
  • Operational hygiene:
  • Port Discovery: The reliance on random ports or varied default ports (1000 vs 5323) without a deterministic discovery file makes integration brittle.
  • Logging: I discovered an on-device log folder exceeding 377 GB. This indicates a lack of log rotation policies, compression, or retention caps.

5. Constructive Recommendations

To fix these issues on Windows, the system requires decomposition into hard boundaries based on workload characteristics.

A. Decompose the Architecture
Do not run OS hooks and AI workloads in the same process.

  1. Collectors (The "Fast" Lane): Tiny, native binaries (Rust or C#) responsible only for capturing events (Clipboard, Window, Input). These should push data to an IPC channel immediately and return control to the OS.
  2. Core Daemon (The "Data" Lane): A background service that normalizes, deduplicates, and batches data for persistence.
  3. AI Workers (The "Slow" Lane): Separate processes for embeddings and summarization, managed with strict resource budgets (CPU affinity, memory caps).

B. Appropriate Technology Stack

  • Windows Collectors: Use .NET/C# (Native AOT) or Rust. Use AddClipboardFormatListener and UIAutomation rather than global hooks where possible to avoid locking the system.
  • Persistence: Move high-velocity telemetry to SQLite (WAL mode) or memory-mapped files. Reserve the Document store/Vector DB for the resulting high-value summaries, not the raw firehose.

C. Governance & Budgeting

  • Backpressure: Implement ring buffers for event capture. If the consumer falls behind, drop events rather than crashing the system.
  • Resource Caps: Enforce hard limits on memory and CPU usage per worker.
  • Batching: Aggressively batch embeddings and database writes. Do not write to disk on every mouse click.
  • Cloud vs. Local: Provide an option to offload AI processing to the cloud. Local-only privacy is a valid feature, but not if it renders the machine unusable.

This is an AI generated summary of my overall concerns.

Metadata

Metadata

Labels

app:desktop applicationapp:pieces osstatus:triagedThe ticket has been reviewed, prioritized, categorized, and assigned to the appropriate team member.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions