一键导入
perf
Profile and optimize Puree engine performance. Covers GPU rendering bottlenecks, layout computation, buffer packing, container count, and frame timing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Profile and optimize Puree engine performance. Covers GPU rendering bottlenecks, layout computation, buffer packing, container count, and frame timing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | perf |
| description | Profile and optimize Puree engine performance. Covers GPU rendering bottlenecks, layout computation, buffer packing, container count, and frame timing. |
| user-invocable | true |
| argument-hint | Describe the performance issue (e.g. "rendering drops to 15fps with 200 containers", "layout takes 50ms on reload") |
Profile and fix performance bottlenecks in the Puree engine itself. This is for framework-level optimization, not user-level UI simplification (use the optimize skill for that).
Performance in Puree breaks down into:
| Phase | Typical Cost | Module |
|---|---|---|
| SCSS compilation | 5–50ms (cached: <1ms) | native_bindings.SCSSCompiler |
| YAML parsing | 5–20ms | parser.py |
| CSS cascade | 2–10ms | native_bindings.SCSSCompiler |
| Layout (Taffy) | 1–15ms | stretchable FFI |
| Script execution | 1–5ms | compiler.py |
| Buffer packing | 1–10ms (scales with containers) | render.py |
| GPU upload | <1ms | render.py (SSBO update) |
| Compute shader | <1ms–5ms (scales with pixels) | shaders/container.glsl |
| Text rendering | 2–20ms (scales with text count) | text_op.py |
| Image loading | 10–100ms per image (first load) | img_op.py |
| Hit detection | <1ms | native_bindings.HitDetector |
Add timing to the suspected bottleneck:
import time
from .log import get_logger
logger = get_logger(__name__)
start = time.perf_counter()
# ... operation ...
elapsed = (time.perf_counter() - start) * 1000
logger.info(f"[PERF] operation_name: {elapsed:.2f}ms")
For frame timing, check render.py — it may already have timing hooks.
Use just tail to live-follow the log, or just logs to see recent output.
Buffer packing (render.py):
array or struct.pack_into instead of Python list concatenationLayout (parser.py / stretchable):
mark_dirty()SCSS compilation (native_bindings):
@import chainsText rendering (text_op.py):
passive: true where possibleShader (container.glsl):
display: none containersCreate distinctive, production-grade Puree UI interfaces with high design quality. Use this skill when the user asks to build UI panels, dashboards, toolbars, or Blender addon interfaces. Generates creative, polished YAML/SCSS/Python code that avoids generic AI aesthetics.
Review Puree UI code (YAML/SCSS/Python) for correctness, common mistakes, and best practices. Use when checking code quality, debugging render issues, or validating before shipping.
Improve Puree typography by fixing font choices, hierarchy, sizing, weight consistency, and readability in YAML/SCSS. Makes text feel intentional and polished.
Create distinctive, production-grade Puree UI interfaces with high design quality. Use this skill when the user asks to build UI panels, dashboards, toolbars, or Blender addon interfaces. Generates creative, polished YAML/SCSS/Python code that avoids generic AI aesthetics.
Review Puree UI code (YAML/SCSS/Python) for correctness, common mistakes, and best practices. Use when checking code quality, debugging render issues, or validating before shipping.
Improve Puree typography by fixing font choices, hierarchy, sizing, weight consistency, and readability in YAML/SCSS. Makes text feel intentional and polished.