PCBnew is slow and renders with glitches on large design

Bug #1825268 reported by Victor W
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
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

Tags: pcbnew
Revision history for this message
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

Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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)
Revision history for this message
Jeff Young (jeyjey) wrote :

@Devs, did we ever get board files for this? I think we could learn a lot from them....

Revision history for this message
Seth Hillbrand (sethh) wrote :

Yes. I suspect that this is addressed. Victor?

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

Dear Seth,

Using a comparatively recent version of kicad (see below), I think many, if not all, of these issues are fixed.

I'm going to push the latest version to our layout tech and request confirmation - though I'm not able to reproduce the issues (and the performance seems to be comparable or better), they'll likely catch anything I missed.

For what it's worth, the differential router is being a bit more touchy; hitting 6 automatically toggles an error ("Can't start it in the middle of nowhere"), and you can't route over existing differential pairs the same way you can route/fix single ended pairs (ie; start from the middle, and then join up and have it delete the middle part). But that appears to be a separate bug.

===

Application: KiCad
Version: (5.1.0-1195-g1548dcfe8), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.1 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.9-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.1
    Compiler: GCC 8.3.0 with C++ ABI 1013

Build settings:
    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

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

Just to close this, we haven't had any issues with this version of kicad, and its performance seems to be similar to the previous version.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Thanks for reporting back, Victor!

Changed in kicad:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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