Enhancement: Memoize sketches list and pagination selectors in SketchList.jsx to prevent redundant rendering cycles
I maintainer di solito rispondono entro 3 giorni
@nodeanurag ci sta già lavorando.
Dal 16/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, redux
- Ambito
- frontend, performance
Direzione di ricerca
Inizia leggendo client/modules/IDE/selectors/project.js e SketchList.jsx, concentrandoti su mapStateToProps e sull’accesso esistente allo stato di sketches e pagination. Aggiungi i selettori memoizzati e usali in SketchList.jsx; il lavoro è completo quando i riferimenti di fallback rimangono stabili e il flusso dei dati e il comportamento esistenti restano invariati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Increasing Access
Optimizing the performance of the editor dashboard reduces local CPU and memory usage, ensuring that the p5.js Web Editor remains highly responsive and functional on low-spec hardware (such as older laptops or educational Chromebooks often used in classrooms).
Feature enhancement details
Rationale
In SketchList.jsx, the mapStateToProps function currently uses inline fallback values:
sketches: state.sketches.projects ?? [],
paginationMeta: state.sketches.metadata ?? {
page: 1,
totalPages: 1,
totalProjects: 0,
limit: 10,
hasPagination: true
}
When state.sketches.projects or state.sketches.metadata is undefined or null, these fallback expressions create new array/object references whenever mapStateToProps runs.
Since mapStateToProps can be evaluated frequently as Redux state changes, including during editor interactions, these unstable references can cause unnecessary prop changes and potentially trigger redundant rendering in SketchList and its child components.
Using memoized selectors with stable module-level default values would provide referentially stable results and avoid this unnecessary work.
Proposed Solution
Expose memoized selectors using @reduxjs/toolkit's createSelector inside client/modules/IDE/selectors/project.js:
const DEFAULT_SKETCHES = [];
const DEFAULT_PAGINATION_META = {
page: 1,
totalPages: 1,
totalProjects: 0,
limit: 10,
hasPagination: true
};
export const selectSketchesList = createSelector(
(state) => state.sketches.projects,
(projects) => projects ?? DEFAULT_SKETCHES
);
export const selectSketchesPaginationMeta = createSelector(
(state) => state.sketches.metadata,
(metadata) => metadata ?? DEFAULT_PAGINATION_META
);
Then import and use these selectors in SketchList.jsx within mapStateToProps.
This would ensure that the fallback values maintain stable references instead of being recreated whenever the underlying values are unavailable, reducing unnecessary prop changes and rendering work.
Expected Impact
- Stable references for fallback values.
- Fewer unnecessary component updates.
- Reduced rendering overhead in the editor dashboard.
- Better performance on lower-spec devices.
- No change to the existing behavior or data flow.
- Lingua principale
- JavaScript
- Stelle
- 1.7k
- Fork
- 1.7k
- Merge medio
- 2g 7h
- PR unite (30g)
- 8
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di processing/p5.js-web-editor
-
Renaming a folder doubles the folder name in file paths (console errors show /lib/lib/helper.js)ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
processing/p5.js-web-editor#4365 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
p5 logo is broken on verification emailsForse già presa @sourabh65mehta l’ha presa 9 giorni fa. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
processing/p5.js-web-editor#4364 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
`PATCH /editor/project/visibility` returns 200 with `null` and doesn't update when `projectId` is a slugForse di nuovo libera @Prbhtsgh l’ha presa 17 giorni fa e non c’è nessuna pull request aperta. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4348 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Fix: example.js stores defaultHTML function reference instead of calling it, causing examples to display raw JavaScript source in previewForse di nuovo libera @syedbarkath980 l’ha presa 21 giorni fa e non c’è nessuna pull request aperta. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
processing/p5.js-web-editor#4344 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
signup form gets stuck when signup request fails due to network errorForse già presa @PS01K l’ha presa 50 giorni fa. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4285 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di processing/p5.js-web-editor
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Add: Story4 CZApertacheck:passed logos:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
adobe/helix-shared#1310 ·
I maintainer di solito rispondono entro 1 giorno
-
[workshop-sim] Improve: Strengthen practice and checkpoints in Step 05 (What Are Agentic Workflows?)Apertafeedback simulation workshop
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
githubnext/gh-aw-workshop#4972 ·
I maintainer di solito rispondono entro 1 giorno
-
agent/ci-maintainer ci good first issue help wanted stage/010-actionable
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
cncf/endusers#1890 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno