Wish: Reduce cpu usage of Pcbnew with Modern canvas

Bug #1779608 reported by Fabián Inostroza on 2018-07-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Moving any object but graphical lines makes Pcbnew use a lot of cpu resources.
I previously reported 1778321 and Tomasz reduced the cpu load when moving graphical lines avoiding the calculation of ratsnets. However moving vias without a net or footprints without pads also produce high cpu usage and moving graphical lines still use a lot of cpu.

The high cpu usage is annoying when working in a laptop as the fan can be spinning at high speed for periods of time when working on a board. It also could increase the battery drain.

I've attached a simple test project.

The high cpu usage is also present in Windows 10 with same machine.

Application: kicad
Version: (5.0.0-rc3-dev), release build
    wxWidgets 3.0.4
    libcurl/7.60.0 GnuTLS/3.5.18 zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.16.0-2-amd64 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.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:

description: updated
Changed in kicad:
status: New → Opinion

I've attached a video showing the CPU load when moving objects.
Maybe something is wrong with my hardware, at least it's not OS dependent.

If this is the expected CPU load for such operations then I'm fine with it.

Looks like the move from OpenMP to std::thread has improved this a lot

Jeff Young (jeyjey) wrote :

@Fabian, improved it enough to close this bug, or is it still somewhat of a problem?

Yeah, now the cpu usage is below 100% (before reached over 300% moving an empty footprint) even when moving a BGA package in the CIAA-ACC project (https://github.com/ciaa/Hardware/tree/master/PCB/ACC/CIAA_ACC) and its feel smooth as before. Board also load faster.

Jeff Young (jeyjey) on 2018-10-07
Changed in kicad:
status: Opinion → Fix Committed
milestone: none → 5.1.0
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers