GerbView: Very Slow and incorrect display when opening many gerbers.

Bug #1825248 reported by Victor W
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

Hi,

When opening a large number of reasonably complex gerbers, GerbView slows down dramatically and eventually becomes unresponsive.

We have a complex project and are looking to view around 40 layers at once.

Even though we can correctly view a comparatively small number of layers (say, 4-6 at a time), when we try to view more than that, GerbView slows down dramatically ("Loading Gerbers Progress Bar").

Moreover, when trying to display more than around 30 gerbers (Not sure what the exact number is, but it's somewhere between 28 and 36), gerbview slows down dramatically, and the rendering breaks, with layers looking completely wrong. Regions that should be completely filled end up looking torn and jagged, and the resulting view is just wrong.

I've attached a screenshot of this to the report.

If you try and work around this, by opening a small number of gerbers at a time, and then incrementally adding more, it is still very slow. If we try and do this to open all 40, gerbview becomes unresponsive for a ridiculously long time (>3min), and then eventually puts up a progress bar ("Loading Gerber Files...").

After about 30s of seeing the progress bar, all the rendering breaks again, and it looks like the attached screen shot.

---

Application: kicad
Version: (5.1.0-293-g45aa51459), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.1.1 libpsl/0.20.2 (+libidn2/2.1.1) libssh2/1.8.1 nghttp2/1.36.0
Platform: Linux 5.0.2-arch1-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: GCC 8.2.1 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: gerbview
Revision history for this message
Victor W (vicw) wrote :
Revision history for this message
Jon Evans (craftyjon) wrote :

Probably we are running into GAL limitations here. I have also seen these slowdowns when I was doing performance testing last year. If any developers feel like diving into the graphics stack, we clearly have some work to do here to optimize things. GerbView is kind of a worst-case stress test since Gerber layers can have way more graphics data than the equivalent PcbNew objects that generate them.

Changed in kicad:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Jeff Young (jeyjey) wrote :

I do mean to profile this at some point. It's slow for me even on the first Gerber.

Revision history for this message
Victor W (vicw) wrote :

Dear Jeff,

Just to be clear, this bug report was filed because it does represent a performance degradation from the original release.

Using the 5.1 release, we were at least able to load up all the copper layers at once, along with the paste, silk, and solder layers. Those represent the most critical layers for us, so we did a review of those, and then we did a separate review of the top/bottom copper, along with all the mechanical/user/fab layers.

With the current nightly, it's no longer possible to do that.

Given the complexity and cost of our design, gerber review is mandatory prior to sending the design to fab. Within this context, this issue really does slow us down, because it prevents us from having a coherent design review (even if it's just the copper layers + silk + solder + paste).

Not sure if that plays a factor with respect to the importance of getting it fixed.

Revision history for this message
Jon Evans (craftyjon) wrote :

Victor, it sounds like you are seeing both PcbNew and GerbView slowdowns since the 5.1 release? They both use the same underlying graphics engine, so maybe that is a clue. I assume you are using accelerated graphics mode?

tags: added: gerbview
Jon Evans (craftyjon)
Changed in kicad:
milestone: none → 6.0.0-rc1
Revision history for this message
Victor W (vicw) wrote :

Yes, we're using accelerated graphics mode.

Revision history for this message
Victor W (vicw) wrote :

One of our engineers also submitted a related bug that appears to duplicate this one;

https://bugs.launchpad.net/kicad/+bug/1851570

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1892

Changed in kicad:
status: Confirmed → Expired
Changed in kicad:
importance: Low → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.