Leistung großer Dokumente
Hält Bearbeitung durch begrenztes Neurendern, getrennte Auswahlzustände und weniger aufwendige Serialisierung pro Tastendruck reaktionsfähig.
large-document-performance
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze dies bei langsamer Eingabe oder Bewegung wachsender Dokumente.
Wobei hilft er dir?
- Aktualisiert geänderte Blöcke statt des gesamten Dokumentbaums.
- Trennt Auswahl- und Werkzeugleistenänderungen von der Dokumentdarstellung.
- Misst Serialisierungs-, Ansichts- und Ziehkosten vor Optimierung.
Das könntest du fragen
Profiliere Eingaben in tausend Blöcken und entferne vollständige Serialisierung bei jedem Tastendruck. Miss Tipplatenz am Dokumentanfang und -ende. Eine Absatzänderung rendert keine unbeteiligten Blöcke neu und serialisiert nicht bei jedem Tastendruck das gesamte Dokument.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
Large Document Performance
Use this skill when optimizing visual editors, block documents with hundreds or thousands of blocks, or spatial canvases with many interactive elements.
Keep Keystroke and Pointer Latency Under 16 ms
- Localize Re-Renders to Modified Blocks Only:
- Typing inside a single paragraph must never re-render all 500 sibling blocks in the document.
- Use immutable structural sharing (
Nodeidentity in ProseMirror/Lexical or keyed block store selectors byblockId) and memoized block components so unchanged subtrees skip re-rendering completely.
- Decouple Selection/Toolbar Updates from Document Tree Renders:
- Cursor movement (
selectionUpdate) fires on every arrow key and click. - Subscribe floating toolbars and format buttons only to derived boolean/primitive formatting state (e.g.,
isBold,activeBlockType) rather than re-rendering the entire editor shell on every caret move.
- Cursor movement (
- Never Serialize the Full Document Synchronously on Every Keystroke:
- Converting a large document tree to JSON or HTML (
editor.getJSON(),editor.getHTML()) on everyinputevent blocks the main thread and causes typing lag. - Perform full serialization lazily: inside debounced autosave callbacks, idle frames, or background workers, or serialize only dirty subtrees.
- Converting a large document tree to JSON or HTML (
Drag, Canvas & Viewport Optimization
- Ephemeral Transform Previews During Drag/Resize:
- During pointer drag or canvas pan/zoom, update GPU-composited transforms (
transform: translate3d(...)) or a lightweight drag overlay layer atrequestAnimationFramecadence instead of mutating and re-layouting the full document tree on everypointermove.
- During pointer drag or canvas pan/zoom, update GPU-composited transforms (
- Spatial Indexing & Viewport Culling:
- For canvases with hundreds of nodes, maintain Axis-Aligned Bounding Boxes (AABBs) in a spatial index (such as an R-tree / quadtree) so hit-testing, marquee selection, snapping, and viewport culling only inspect visible/nearby elements.
- For very long block documents or block pickers, virtualize off-screen heavy embeds (charts, code editors, high-res media) while keeping native browser find/selection behavior clear.
Checklist
- Does typing in one block re-render only that block (and affected ancestors) rather than the entire document?
- Is full JSON/HTML serialization deferred to debounced save/export paths rather than running on every keystroke?
- Are toolbar/inspector subscriptions scoped to minimal derived state so cursor moves stay fast?
- Do drag, pan, and zoom gestures use lightweight transform previews and spatial culling on large documents?
Enthaltene Dateien 1
SKILL.md
Über dieses Skill-Paket
large-document-performance
large-document-performance: Entwickelt visuelle und Rich-Text-Editoren mit konsistenten Dokumentmodellen, Auswahl, Rückgängig, Autosave und zuverlässiger Serialisierung.
Weniger anzeigen
large-document-performance
large-document-performance: Entwickelt visuelle und Rich-Text-Editoren mit konsistenten Dokumentmodellen, Auswahl, Rückgängig, Autosave und zuverlässiger Serialisierung.
Enthält den vollständigen Skill und seine Begleitdateien (1 Dateien). Der genaue, ursprünglich verfasste Anwendungsbereich bleibt unten erhalten.
Ursprüngliche Skill-Beschreibung (Quellsprache)
Use when keeping typing, dragging, and scrolling responsive in large block documents and canvases through localized subtree rendering, memoized node views, spatial indexing, and throttled serialization.
Installiere den Skill, prüfe seine Quelle und Vertrauenseinstellungen und aktiviere ihn für das passende Projekt oder den Agenten.
Voraussetzungen
- Orqestria auf deinem Computer installiert.
