Organizer: selecting a folder spends about 0.19 s per calculation on the main thread (ProjectContextPanel::initialize)

Aperta
#1,299 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Start by profiling ProjectContextPanel::initialize while selecting folders with many calculations, as described in the issue; compare local and SSH folders. Identify the per-row work rebuilding the mirror and reading properties, then address its cost or main-thread impact. Add a test that bounds selection time for a folder of N calculations.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Selecting a folder in the Organizer does local work on the GUI main thread after the listing arrives, and that work grows with the number of calculations in the folder. Measured headless on an SSH folder, as the whole selection minus the remote script (#1220):

Folder Remote script Whole selection Local work
8 plain folders 68 ms 0.61 s ~0.4 s
300 plain folders 1.74 s 2.57 s ~0.8 s
20 calculations 2.16 s 5.93 s ~3.8 s

That is about 0.19 s per calculation. The tree rows and icons cost almost nothing (0.03 s for 300 rows), and getChildren was already cached. Most of the time is in setContextPanel → ProjectContextPanel::initialize, which rebuilds the mirror and reads properties for each row. It has not been profiled inside yet. At this rate a folder of 200 calculations would block the window for about 40 s. A local folder is probably affected too; this has not been checked.

To do: profile ProjectContextPanel::initialize on a folder with many calculations (local and SSH), remove the per-row cost or move it off the main thread, and add a test that bounds the selection time for a folder of N calculations.

Lingua principale
C
Stelle
10
Fork
8
Merge medio
6h 32m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FriendsofECCE/ECCE

Tutte le issue di FriendsofECCE/ECCE

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.