profiling-client-performance
Skill by TriliumNext
Guides diagnosis of client-side performance problems in Trilium, such as typing stutters, janky dragging and slow widgets. Covers reading Chrome DevTools traces, the debug_perf profiler, and gesture measurement on devices without devtools.
Install profiling-client-performance
Built from the published package, never by AI.
git clone --depth 1 https://github.com/TriliumNext/Trilium /tmp/Trilium && mkdir -p ~/.claude/skills && cp -r /tmp/Trilium/.claude/skills/profiling-client-performance ~/.claude/skills/profiling-client-performanceRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install profiling-client-performance in Claude Code
git clone --depth 1 https://github.com/TriliumNext/Trilium /tmp/Trilium && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Trilium/.claude/skills/profiling-client-performance ~/.gemini/antigravity-cli/skills/profiling-client-performanceAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install profiling-client-performance in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill helps an assistant diagnose hard client-side performance problems in Trilium, such as typing stutters, janky dragging, slow widgets and periodic freezes. It uses three tools in order: analyze-trace.mjs reads a recorded Chrome DevTools trace to find which subsystem is using the main thread, debug_perf measures what a specific operation costs and how often, and gesture_perf.ts logs frame intervals and section times to the server log for devices without devtools.
The skill is aimed at developers working on the Trilium codebase who need to find the cause of a slowdown rather than guess at it. It advises measuring before changing code, counting calls before timing them, and reproducing problems against a copy of real data. Instrumentation is meant to be removed when the investigation ends, and the source says debug_perf stays in place as the tool.
Written from the project's SKILL.md and checked against it.
What it can do
- analyze-trace.mjsReads a recorded .json or .json.gz trace with summary, spikes, profile and timeline modes.
- spikes modeAggregates self time inside long tasks with a stack attached to name the likely culprit.
- summary modePrints each long task with the gap from the previous one, showing timer-driven or user-driven stalls.
- debug_perfProvides perfCount and perfSpan calls to count how often and how long an operation runs.
- triliumPerf consoleLets you enable stall reporting and print a table of call counts, totals, averages and maximums.
- gesture_perf.tsTimes gesture sections and frame intervals on a device and writes the figures to the server log.
- Readback optionForces a pixel readback after each section so queued GPU canvas work shows up in the timing.
- Variant switchingAlternates two code paths every few gestures so both can be compared in one session.
What you need
- Node.js
- pnpm, for the desktop and server dev commands
- A Trilium source checkout with a dev build
- A Chrome DevTools Performance recording for trace analysis
Try asking
- Analyze this Chrome DevTools trace and tell me which subsystem is blocking the main thread.
- Add perfCount and perfSpan calls around the board card render to measure its cost.
- Set up gesture_perf to time a pan gesture on my iPad and read the server log.
Good to know
- debug_perf and gesture_perf need source changes and a dev build or dev server.
- Dev-build numbers run about 1.5 times higher than a production Electron build.
- Long Tasks are Chromium only, and Firefox falls back to a frame-gap watchdog.
- Safari's timer has a 1 ms resolution, so short sections read 0 or 1.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/profiling-client-performance/SKILL.md, .claude/skills/profiling-client-performance/analyze-trace.mjs, .claude/skills/profiling-client-performance/gesture_perf.ts. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
analyze-trace.mjs11 KB -
gesture_perf.ts5 KB
Alternatives to profiling-client-performance
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
profiling-client-performance: common questions
What is analyze-trace.mjs used for?
It reads a recorded Chrome DevTools trace and reports which subsystem is burning the renderer main thread. The spikes mode is the one the source recommends first.
Can I profile Trilium on an iPad?
Yes, using gesture_perf.ts. It sends frame and section timings to the server log because an iPad has no console and cannot record a trace.
Does debug_perf run by default?
No. Nothing calls into it by default, so you add call sites for the investigation and remove them afterwards.
How do I install profiling-client-performance?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is profiling-client-performance free?
The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.
Is profiling-client-performance safe to use?
It scores 89 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to profiling-client-performance?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
