makepad-2.0-performance

Diagnose and optimize Makepad 2.0 rendering, draw batching, and garbage collection performance.

747|87|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/ZhangHanDong/makepad-skills --skill makepad-2-0-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: makepad-2.0-performance
Source: https://github.com/ZhangHanDong/makepad-skills/tree/main/skills/makepad-2.0-performance
Command: npx skills add https://github.com/ZhangHanDong/makepad-skills --skill makepad-2-0-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Makepad 2.0 apps suffer from invisible text, hover glitches, scroll stuttering, and GC pauses caused by its batched GPU draw pipeline and Splash VM memory model. This Skill explains the root causes and provides concrete fixes for each performance and rendering issue.

Core Features & Use Cases

  • Draw Batching Fixes: Explains when new_batch: true is required to prevent text rendering behind backgrounds, including the common hover-disappearing-text bug.
  • GC Tuning: Covers mod.gc.set_static(), run(), and run_status() for controlling the mark-sweep collector and reducing GC pause times in long-running apps.
  • Render Optimization: Details the on_render / .render() pull-based model, texture caching with ViewOptimize, and PortalList virtualization for large lists.
  • Use Case: Your Makepad app's list items lose their text on hover and scrolling stutters with 1000 rows. Apply new_batch: true to item templates and migrate the list to PortalList for constant-time scrolling.

Quick Start

Ask the AI to diagnose why Label text is invisible inside a RoundedView with a background color in your Makepad 2.0 app.

Frequently Asked Questions about makepad-2.0-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why is my Label text invisible inside a View with a background in Makepad?

Makepad batches draw calls by shader type, so text can render behind a sibling or parent background. Add new_batch: true to the View with show_bg: true to force a new draw batch with correct ordering.

How do I fix text disappearing on hover in Makepad 2.0?

Hover animations that transition a background from transparent to opaque cover batched text. Set new_batch: true on the hoverable View and on its parent container so each item renders its background and text in one batch.

How does garbage collection work in the Makepad Splash VM?

The Splash VM uses a mark-sweep GC with per-type heaps that trigger when a category doubles since the last cycle and exceeds minimum thresholds. Use mod.gc.set_static() for permanent UI trees and mod.gc.run_status() to inspect heap statistics.

When should I use PortalList instead of a scrollable View in Makepad?

Use PortalList for lists with 100 or more items because it virtualizes rendering so only visible items are drawn. A manual loop inside ScrollYView draws every item each frame, causing scroll stuttering and high memory use.

What is the difference between new_batch and texture_caching in Makepad?

new_batch creates a new DrawList2d to fix draw ordering within a subtree, while texture_caching renders children to an offscreen GPU texture to skip re-rendering unchanged content. If both are set, texture_caching takes precedence.

Why does my Makepad UI freeze when updating state?

Calling .render() inside loops or on the root view rebuilds large widget subtrees repeatedly. Batch state changes first, then call .render() once on only the affected sub-view.