PCBnew is slow and renders with glitches on large design

Bug #1825268 reported by Victor W on 2019-04-18
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Medium
Tomasz Wlostowski

Bug Description

Using a nightly version of pcbnew, we've noticed some substantial performance degradation when working with a complex layout. In our case, we have around 130k nets, and just over 13k pads, with 26 layers.

We're observing the following issues;

1) Slow performance when scrolling or viewing design

When scrolling around the board, it seems to take a really long time for everything to happen. Zooming in or out takes is really slow and laggy.

2) Slow/laggy/inconsistent performance when routing traces.

In addition, pcbnew is very slow when routing tracks, it seems really laggy, and it doesn't always work - it will look like you're routing a track, but when you try and finish it, it does not always appear or remain, and you have to do it over.

3) Graphics glitches

When changing views or layers, sometimes you get really weird artifacts, tearing, or glitches.

The best example is when alternating between "show filled areas in zones" and "do not show filled areas in zones".

If you toggle between the two, eventually things end up looking really funny - maybe the wrong colour, or else an entire layer will disappear. This also sometimes happens if you rapidly switch between high contrast mode (h) and regular mode. It also sometimes happens if you toggle between drawing modes, especially fill zones and sketch zones.

---

I realize that this bug report is very qualitative, but the problem here is that the behavior is really inconsistent. Sometimes it works, other times we only belatedly realize that it's not showing all the pads for the front of the board.

Most of the issues we're seeing did not exist with the release version of kicad v5.1.

(With the release version, it's still a bit laggy, but nowhere nearly as bad as it is using the current git build).

I see these problems using the following nightly version of kicad;

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

Paul van der hoeven (paulvdh) wrote :

130k nets? Waauw!
I have a pretty slow 11 year old PC myself and don't blame KiCad for performance issues. It gets a bit laggy when viewing the Olimexino 64 (example project on Kicad site / github) and it would not be fun to design such a board on my PC though.

Just curious: What kind of hardware do you put in a PC to design such boards?

I have noticed 2 things that infuence performance significantly:
- If the 3D viewer is open, it's constantly updated (which is good) but this makes things slow.

- Sometimes KiCad seems to change from "Modern Toolset (accellerated) [F11] to "Fallback [F12]" which makes things slow. I assume it does this when it encounteres some openGL problem.

On my V5.1 I also sometimes get "assertion failed" messages, and from what I know of programming keeping track of assertions slow programs down and are usually disabled in release versions.

Application: pcbnew
Version: 5.1.0+dfsg1-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-4-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: Clang 7.0.1 with C++ ABI 1002

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

Jon Evans (craftyjon) wrote :

While KiCad has some known shortcomings when it comes to handling very large designs, it's worth investigating this particular case as I'm not aware of a reason why PcbNew would have slowed down significantly between 5.1 and the current nightlies.

Changed in kicad:
importance: Undecided → Medium
milestone: none → 6.0.0-rc1
status: New → Triaged
eelik (eelik) wrote :

I'm not a developer, but as a normal user who likes to experiment it would be very interesting to try a project with that many layers. Is it proprietary or could you share it?

Tomasz Wlostowski (twlostow) wrote :

Hi Victor,

Can you send me the board file? I'll try to see what can be done to improve the speed.

Tom

Changed in kicad:
assignee: nobody → Tomasz Wlostowski (twlostow)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers