processing / processing/p5.js-web-editor

Performance Monitor: Real-time Performance Analysis for p5.js Web Editor

Open
#3,775 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Needs Discussion Type:Idea
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

Increasing Access

A real-time performance monitoring tool that helps users understand why their sketches run slowly and provides actionable suggestions to fix common performance mistakes.

Problem Statement
Many p5.js users, especially beginners, create sketches that run slowly without understanding why. Common mistakes like calling loadImage() inside draw() can make sketches 60x slower than necessary. Currently, users have no way to:

  1. See real-time FPS and performance metrics
  2. Identify which parts of their code are slow
  3. Learn about common performance anti-patterns

Proposed Solution
A performance monitor panel integrated into the p5.js Web Editor that provides:

  1. Real-time FPS graph showing frame rate over time
  2. Frame time breakdown showing where time is spent
  3. Memory usage meter tracking heap usage
  4. Smart warnings that detect common performance mistakes
  5. Fix suggestions with one-click solutions

How This Increases Access

  1. Beginners learn optimization concepts through immediate feedback
  2. Educators can demonstrate performance concepts visually
  3. Users with older devices can identify why sketches run slowly
  4. ESL users benefit from visual indicators instead of text-heavy docs
Feature request details

Feature Components

Component 1: FPS Counter
Component 2: Frame Time Breakdown
Component 3: Memory Usage

┌──────────────────────────────────────────────┐
│ FPS │
│ ┌──────────────────────────────────────────┐ │
│ │ 60 ┤████████████████████████████████████ │ │
│ │ 45 ┤ │ │
│ │ 30 ┤ │ │
│ │ 15 ┤ │ │
│ │ 0 ┼─────────────────────────────────────│ │
│ │ 0s 5s 10s 15s │ │
│ └──────────────────────────────────────────┘ │
│ Current: 58 FPS | Average: 57 FPS │
│ Status: ✅ Good │
└──────────────────────────────────────────────┘

┌──────────────────────────────────────────────┐
│ Frame Time: 16.2ms (target: 16.67ms) │
│ │
│ ██████████████████░░░░░░░░░░░░░░░░ 97% │
│ │
│ Breakdown: │
│ ├─ draw(): 12.4ms ████████████░░░ 76% │
│ ├─ rendering: 2.8ms ███░░░░░░░░░░░░ 17% │
│ └─ other: 1.0ms █░░░░░░░░░░░░░░ 7% │
└──────────────────────────────────────────────┘

┌──────────────────────────────────────────────┐
│ Memory │
│ │
│ Used: 45MB / 100MB │
│ ████████████████░░░░░░░░░░░░░░░░░░ 45% │
│ │
│ Objects tracked: │
│ ├─ Images: 5 (12MB) │
│ ├─ Graphics: 2 (8MB) │
│ ├─ Arrays: 24 (15MB) │
│ └─ Particles: 1,247 (10MB) │
└──────────────────────────────────────────────┘

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by mapping the p5.js Web Editor architecture and its sketch execution and panel components, then determine the scope and integration points for FPS, frame-time, memory, warnings, and suggestions; done requires an agreed design and working implementation of the proposed components.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.