cesartevisual/threejs-skills

threejs-performance

Profile and optimize Three.js frame time, GPU workload, asset memory, and resource leaks.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/cesartevisual/threejs-skills --skill threejs-performance

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Performance and Memory

Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions.

Reproduce on a representative device and record scene state, viewport, pixel ratio, backend, asset sizes, and frame-time distribution. Distinguish first-load/decode/compile stalls from steady-state frame cost. Read the profiling worksheet for a repeatable before/after record.

Determine whether the bottleneck is CPU work, submission/draw calls, GPU shading/fill, transfers, or memory. Reduce resolution to probe pixel cost; isolate shadows/effects; compare static versus animated updates. Change one major variable at a time.

Use instancing/batching when draw calls dominate, reduce overdraw/effect resolution when fill dominates, and simplify animation or move appropriate work off-thread when CPU-bound. Lowering triangles will not fix every bottleneck. Avoid per-frame allocations and repeated shader recompilation.

Define resource ownership across shared caches and instances. Release owned geometries, materials, textures, targets, controls, mixers, observers, and listeners. Disposing a material does not dispose its textures; disposing a renderer does not free all scene-owned objects. Do not dispose cache entries still in use.

Measure repeated mount/unmount and model replacement after warmup. Internal caches can leave nonzero counters; look for an unexplained rising trend rather than demanding zero. CPU heap and renderer.info are partial evidence, not exact GPU memory.

Accept an optimization only when the measured improvement preserves required appearance and interaction. Report device, method, before/after values, and limits of the measurements.

API reference

Consult the official documentation for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills