Poor performance when "drawing" many instances containing hidden layers

オープン
#2,227 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@klayoutmatthias がすでに取り組んでいます。

2025年11月25日 から。

評価

この issue はまだ評価されていません。

説明

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).

主要言語
C++
スター
1.2k
フォーク
305
平均マージ
3日 2時間
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

KLayout/klayout のほかの issue

KLayout/klayout の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。