Repository navigation
Update the Launch page to @playcanvas/inspector 0.4.0, and consider retiring its profiler #2461
Description
Do this after engine 2.24 is promoted to the Editor.
The Launch page embeds the Inspector from @playcanvas/inspector, pinned at 0.3.0 (package.json), and opens it with ?inspector (src/launch/viewport/viewport.ts). 0.4.0 is released, with the same playcanvas peer range (^2.23.0). It adds a Performance tab, which records the frames of the application over time:
- the frame, CPU (by phase), GPU and draw call figures of each frame, with each frame on a timeline of its own;
- the time of each script type, and on WebGPU of each GPU pass, grouped by the effect running it;
- a Loading section with the milestones of the page and the application, the assets loading and the requests in flight;
- a Startup entry, from the page opening to the first frame, when recording begins before the first frame (the
recordoption); - the application's own counters from
app.stats.user, the batcher's time and lightmap bakes; - copying any of it as JSON or CSV.
The Launch page also has a profiler of its own, opened with ?profile=true (src/launch/tools/). What it shows, and where the Inspector 0.4.0 covers it:
| Launch profiler | Inspector 0.4.0 |
|---|---|
| Frame, Draw Calls, Shaders and VRAM panels | The Performance tab charts and the details of each frame |
| Batching panel | The batching phase of the render |
| Lightmapper panel | The Lightmaps events row and the bakes on the frame timeline, with their lightmaps, passes, render targets and shaders |
| Scene panel: mesh instance count | Not charted; the Hierarchy and Meshes tabs list them |
| Load timeline: preload, start, asset loads, shader compiles, lightmapper | The Loading section, the Startup entry and the Events rows |
Camera draw calls limit (ForwardRenderer.skipRenderCamera) |
Stepping through the draws of a pass on the Frame graph tab |
App panel fields added with tools:frame:field:add |
The Counters section, from app.stats.user |
Some of the launch profiler's figures are not filled by the engine any more and always read zero or nothing: the Particles panel, the scene's light counts, the depth, immediate and instancing draw call counts, and the shadow map, lightmap and asset texture memory. Its lightmapper Forward Time and ShadowMap Time over-count: the engine's lightmapper adds the renderer's running totals for the frame after each pass, so each pass counts the ones before it again.
The Launch page creates the Inspector without the record option, so its Performance tab cannot record the start of the application.
Tasks:
- Update
@playcanvas/inspectorto 0.4.0. - Consider deprecating the Launch page's profiler in favour of the Inspector's Performance tab.
- Make sure to have an option to auto-run the profiler, to allow load time profiling
- When that happens, update the User Manual: the Profiler page and the pages pointing to it, towards Inspector Performance (
/user-manual/optimization/inspector-performance/).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity