← Asztali alkalmazás fejlesztők adatlapja
Nézd meg, miben segít
Asztali diagnosztika és teljesítmény
Méri az indulás és futás szűk keresztmetszeteit, személyes adatot nem kiszivárogtató diagnosztikával.
desktop-diagnostics-performance
Ezt a skillt használó csapattagok
Mikor hasznos?
Akkor használd, ha asztali alkalmazásod lassan indul, lefagy vagy egyre több memóriát használ.
Miben segít neked?
- Elkülöníti a főfolyamat indulását, felületi munkát és folyamatközi kommunikáció költségét.
- Követi az erőforrások gazdáját és az összeomlás utáni helyreállítást.
- Megtisztított naplókat és verzióval, környezettel azonosítható diagnosztikát készít elő.
Például ezt kérheted
Vizsgáld az ablak újranyitásakor növekvő memóriát, és tervezz érzékeny adat nélküli diagnosztikai csomagot. Tízszer nyisd újra az ablakot, és hasonlítsd össze a megmaradó memóriát és figyelőket. A diagnosztika azonosítsa a buildet, magándokumentumok tartalma nélkül.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Desktop Diagnostics & Performance
When a desktop application fails on a user's machine, you cannot SSH into their laptop. Build fast cold-start paths, bounded memory usage, and self-contained, redacted diagnostic reporting so issues can be diagnosed without guesswork.
Cold-Start & Runtime Performance Discipline
- Keep the Main / Core Process Startup Path Lean:
- Measure time from process launch to
window.ready-to-show. - Defer non-essential module imports, cloud/CLI health probes, and background indexers until after the first window frame is painted (
ready-to-show). - Bundle main-process and preload code (e.g., via Vite/esbuild/Rollup) rather than forcing Node.js to resolve thousands of individual
node_modulesfiles from disk on cold start.
- Measure time from process launch to
- Prevent Renderer & IPC Bottlenecks:
- Never serialize multi-megabyte JSON payloads or raw file buffers across
ipcRenderer.invokeon every keystroke or log line (structured-clone serialization blocks both Renderer and Main threads). - Batch high-frequency subprocess/log events (e.g., flushing every
50ms–100ms), paginate large history queries, and serve large media or artifacts via custom streaming protocols (protocol.handle('app-asset', ...)or local loopback range requests).
- Never serialize multi-megabyte JSON payloads or raw file buffers across
- Monitor & Bound Memory Growth:
- Track main process RSS, renderer V8 heap (
process.getProcessMemoryInfo()), and child-process counts. Dispose detachedBrowserWindowlisteners, clear completed subprocess buffers, and cap in-memory log rings.
- Track main process RSS, renderer V8 heap (
Crash Recovery & Privacy-Safe Diagnostics
- Graceful Renderer & Utility Process Crash Handling:
- Listen for
webContents.on('render-process-gone', (event, details) => ...)andutilityProcess.on('exit', ...). If the renderer crashes (reason === 'crashed'or'oom') or the embedded backend exits unexpectedly, log the exit code/reason and show a recovery screen with a one-click "Reload Window" / "Restart Local Service" action instead of leaving a dead blank window.
- Listen for
- Structured, Redacted Local Log Files:
- Write rotated, size-capped log files (
maxSize: 10MB,maxFiles: 5) inapp.getPath('logs')capturing startup phases, embedded server boot, IPC errors, and CLI preflight results. - Scrub all secrets before writing to disk: redact
Authorizationheaders, API keys (sk-...,ghp_...), session tokens, and private environment variables.
- Write rotated, size-capped log files (
- One-Click Diagnostic Bundle / Copy System Info:
- Provide a built-in diagnostic summary (
App Version,Commit SHA,OS & Arch,Electron/Tauri Version,Detected CLI Statuses,Database Schema Version, and recent redacted error log tail) so users can attach actionable evidence to bug reports without opening a terminal.
- Provide a built-in diagnostic summary (
Csomagban lévő fájlok 1
SKILL.md
