Deep performance optimization knowledge for the Lichtblick codebase. Covers profiling techniques, common bottlenecks, memory management patterns, and optimization strategies specific to real-time data visualization.
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/performance/SKILL.mdrenderState.ts, non-stable referencesbuildRenderState returns same reference when data unchangedDynamicBufferGeometry reuse, instanced rendering, frustum cullingCachingIterableSource), evict behind read head, lazy deserialization. Note: this is separate from the 500MB default HTTP-layer cache in RemoteFileReadable/CachedFilelike used for remote file reads.// Transfer ArrayBuffer to Worker (not copy)
Comlink.transfer({ buffer: myArrayBuffer }, [myArrayBuffer]);
// After transfer, myArrayBuffer.byteLength === 0 (detached)// Reuse Vector3 instances instead of creating new ones
const tempVec = new THREE.Vector3();
function updatePosition(x: number, y: number, z: number) {
tempVec.set(x, y, z);
mesh.position.copy(tempVec);
}// Only create new object if data actually changed
const newMessages = messages !== prevMessages ? [...messages, ...newBatch] : prevMessages;// Coalesce rapid state updates
#scheduleEmit() {
if (this.#emitScheduled) return;
this.#emitScheduled = true;
queueMicrotask(() => {
this.#emitScheduled = false;
this.#emitStateImpl();
});
}// Only request data for topics panels actually need
const activeTopics = mergeSubscriptions(allPanelSubscriptions);
player.setSubscriptions(activeTopics); // Player only iterates thesewindow or document)FinalizationRegistry for Worker proxy cleanup (see ComlinkWrap)useEffect cleanup functions for all subscriptionsWeakRef / WeakMap for caches that shouldn't prevent GC.dispose() calls in panel unmountbenchmark/ directorycd benchmark && yarn startlichtblick-suite/lichtblick
9589f38
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.