Skip to content

New skill: performance-and-dense-data (numpy buffer interop + profiling) #31

Description

@TMHSDigital

Context / Problem Statement

The pack's core thesis is "do bulk Blender work the fast way," and rules (prefer-data-over-ops-in-loops, use-foreach-set-for-bulk-data) plus the foreach-* snippets point that direction. But there is no skill that teaches scaling to dense meshes: numpy buffer interop with foreach_get/foreach_set, attribute-domain bulk operations, the bmesh-vs-data-API decision under load, and how to profile headless. AI agents currently get the "don't do it slow" rules without a positive "here is the fast, measured pattern" skill.

Proposed Solution / Implementation Steps

  1. Create skills/performance-and-dense-data/SKILL.md with the standard YAML frontmatter (name: performance-and-dense-data, one-line description, standards-version: 1.10.0).
  2. Cover: preallocated numpy arrays with foreach_get/foreach_set (np.empty(n*3)), reshaping conventions, attribute API bulk read/write across domains, when bmesh wins, and a headless cProfile/time.perf_counter measurement pattern. Show 5.1 and 4.5 paths where they diverge.
  3. Add 1–2 supporting snippets (e.g. numpy-foreach-vertices.py) and a self-verifying assertion in the smoke harness (roundtrip equality + a coarse timing sanity check).
  4. Update README.md aggregate counts, ROADMAP.md candidate pool, AGENTS.md, and plugin.json; commit with feat:.

Definition of Done

  • New skill passes frontmatter + name=dir CI checks.
  • Shows numpy buffer interop and at least one profiling pattern, with 4.5/5.1 branches where relevant.
  • Supporting snippet(s) added and smoke-exercised.
  • README counts, ROADMAP, AGENTS, and manifest updated (counts gate green).

Filed from the repository technical audit — see docs/technical-audit.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions