specs-lens-perf-attribution

Attribute Lens Studio Preview frame time to project systems via differential performance sweeps.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-lens-perf-attribution-lens-studio-devs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specs-lens-perf-attribution
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/specs-lens-perf-attribution
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-lens-perf-attribution-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, perfetto, and includes scripts (resource) and references (resource) components.

What problem does it solve? Lens Studio Preview traces show total frame time but not which project systems cause it, making optimization guesswork. This Skill attributes ms/frame to concrete scene roots, scripts, packages, and renderables through differential performance sweeps and component toggling. ## Core Features & Use Cases - Differential Sweep Design: Builds cumulative stage matrices (baseline, camera, tracking, VFX, scripts, full Lens) with targeted A/B toggles to isolate each subsystem's cost. - Trace Analysis Tooling: Bundled Python scripts parse Perfetto/SQLite traces, compute positive ms/frame deltas, and emit CSV summaries, donut charts, and optimization candidate reports. - Simulation Harness Guidance: Reference patterns for exercising gesture-, voice-, or tracking-gated systems so traces reflect representative load instead of idle Preview. - Use Case: A Lens runs below target FPS. You capture staged traces, run the attribution analyzer, and get a donut chart plus a ranked optimization plan showing, for example, that gaussian splats cost 1.86 ms/frame and SIK input costs 0.41 ms/frame. ## Quick Start Ask the agent to profile your Lens Studio project's Preview performance and produce an attributed ms/frame breakdown with optimization recommendations.

Frequently Asked Questions about specs-lens-perf-attribution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what is slowing down my Lens Studio project?

Capture staged Preview performance traces while toggling subsystems on cumulatively, then compute positive ms/frame deltas between adjacent stages. The bundled analyzer scripts produce CSV summaries, a donut chart of contributors, and a ranked optimization candidates report.

How do I analyze Lens Studio Perfetto traces in Python?

Export .pftrace files to SQLite with trace_processor_shell, then run analyze_perfetto_attribution.py on the trace directory. It reads the intrinsic slice and counter tables, computes per-frame attribution, and writes differential CSVs and charts.

Can I get CPU core-time from Lens Studio Preview traces?

No. Lens Studio Preview performance traces do not expose scheduler or CPU tables, so total CPU core-time is unavailable. Results must be reported as attributed slice ms/frame, not CPU time.

Why is my Preview profiling trace not representative?

Profiling an idle Preview under-measures the Lens because gesture-, voice-, or tracking-gated systems stay dormant. Add a minimal reversible harness script that triggers the real code paths, confirm it via logs and screenshots, then capture traces.

What Python packages do the trace analysis scripts need?

The scripts use only the standard library plus matplotlib for donut charts. Raw .pftrace summarization optionally uses the perfetto Python trace processor bindings, while exported SQLite traces need only sqlite3.