Poor performance when "drawing" many instances containing hidden layers

Aperta
#2,227 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@klayoutmatthias ci sta già lavorando.

Dal 25/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

Layouts containing a large number of instances can be very slow to redraw (and cause freezes / crashes), even in cases where those instances contain only a single, hidden, layer.

I've attached a file (tiles.gds.gz) that can help to show the effect -- to reproduce, open the file, hide layer 1/0, show the full hierarchy (to avoid drawing cell boxes), then zoom in and out and watch the other layers get drawn one-by-one.

The effect goes away if you flatten the layout -- based on this, I assume the drawing code is visiting each instance (but drawing nothing as the layer is hidden). Is there an easy opportunity to do some caching (e.g. "nothing to draw for this cell, skip its instances"), or are instances stored in a way that wouldn't help?

Happy to try to build something myself, but figured I'd ask before getting too deep into the code (so far, some quick profiling pointed me towards layRedrawThreadWorker.cc).

Lingua principale
C++
Stelle
1.2k
Fork
305
Merge medio
3g 2h
PR unite (30g)
11

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 KLayout/klayout

Tutte le issue di KLayout/klayout

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.