Switching hierarchical sheets has become slow in v7

Hi, been testing v7 for a bit, both on Windows and Linux, and I have noticed that switching hierarchical sheets in schematics has become significantly slower in v7 compared to v6, both using the new sheet navigator or just using the old way of navigating.

Has anyone else noticed it? Haven’t seen a report about this so far. While not a dealbreaker, it’s sluggish enough to feel “annoying”. In v6, it was nearly instant on the same schematics.

One possible cause is the new cross-selection-feature which cross-selects multiple items between schematic <–> board. Because a schematic sheet contains many symbols all corresponding footprints have to be cross-selected on the board. This can lead to a delay. It’s the price we have to pay for development (adding new features).
You can check this assumption if you switch off all cross-selection checkboxes in the gloabl Preferences. Be sure to switch off the checkboxes in the board-editor preferences as well as in the schematic-editor preferences.

If these doesn’t helps than there must be another cause for your (or better: your kicad installation) slowdown.

The delay caused by the cross-selection was discussed with gitlab issue Cross-probing performance regression (#11420) · Issues · KiCad / KiCad Source Code / kicad · GitLab.
Some improvements were done, the remaining slowdown is caused by the needed processing power.

This is highly dependent on the project. Please report this to the issue tracker and attach your project to the report

Apparently more people are complaining about this.

We can’t do anything unless people report issues with projects attached

That cross-selection thing would have an impact when selecting symbols on schematics, but how would it when just opening a sheet? I did notice there was some delay in v7 when selecting some symbols (not all) on schematics, and I guess this would be the reason. But just switching to a different sheet?

Anyway, I did try unchecking all cross-selection checkboxes in Preferences, and it doesn’t seem to improve it.

This delay when switching sheets is not very long, but it’s very noticeable (and the machines I’ve tried this on are pretty powerful.) I noticed it on a number of different multi-sheet schematics, so it doesn’t seem to be specific to a particular schematic. Also noticed it on different machines with different OSs, so it seems relatively consistent rather than a platform/installation/project-specific “issue”.

The fact it’s a relatively small delay, and the fact v7 is still not widely deployed is likely a factor explaining why you didn’t get many reports yet. You may think I’m just nitpicking, but it’s still a (albeit minor) regression compared to v6.

I did a test on the Olinuxino A64 Rev C, and it did not have any noticeable delay when switching between schematic sheets, so I can not confirm it.

As craftyjon mentioned before, the KiCad developers need an example project that shows this behavior. First to verify the issue exists, and then later, as a test case to verify the problem has been solved.

That cross-selection thing would have an impact when selecting symbols on schematics, but how would it when just opening a sheet?

It all depends on the circumstances. If you open the subsheet from the root-sheet with a doubleclick on the subsheet-rectangle than all items on that subsheet get cross-selected in the board. So in this case the cross-selection-delay would apply. Using the navigator-panel works without cross-selection, so no delay from there. Anyway, as you have tested this I conclude that my first assumption was false.

Out of curiosity I created the following two attached projects to compare v6 <–>v7. They contain subsheet_03 which is overfilled with symbols+nets, this is not relevant for daily work.

test:

  • open schematic, enable navigator
  • switch to subsheet_03 <–> switch to multichannel_1 some times back and forth (to make sure that internal program-caches are filled)
  • switch to multichannel_1
  • now count the time: switch to subsheet_03
  • results on my machine (old Dell laptop with i7-3610)
  • v6: needs ca. 0,9s on my machine until display of schematic subsheet_03
  • v7: needs ca. 1,4s on my machine until display of schematic subsheet_03, than another additional second with rotating sandclock hourglass.

So yes, the switch to this subsheet introduces a noticable delay, which is greater in v7. So there is a performance regression on v7, but until now it has no impact on my normal projects.

schematic_subsheets_speedtest_v6.zip (983.0 KB)

schematic_subsheets_speedtest_v7.zip (903.7 KB)

2 Likes

I can’t share the projects I have that made this delay obvious, so I was going to make a ‘minimal’ project showing it. Thanks for doing this! Yes, the subsheet_03 is particularly “long” to open in v7. In v6, on my machine, it takes less than half the time.

While it may not look like a huge deal, I think this performance issue would be something to improve upon.

The Subsheet_03_full_crowded loads in around half a second with KiCad V7.0.0 on my AMD 5600G. I don’t have KiCad V6 anymore, so I can’t compare it with that. For me, I do notice it’s not “instant”, but that’s about it. I guess my PC is just too quick.

But I do agree to give this some attention. If you let sluggishness accumulate, then at some time in the future you may get into the same ballpark as FreeCAD. One of my drawings in FreeCAD takes over 3 minutes for the initial load, and something like that is hard to fix. (It is quite a complex drawing though, and after the initial loading I can still work on it half decently).


Version: 7.0.0-da2b9df05c~163~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.10.1
	HarfBuzz 6.0.0
	FontConfig 2.13.1
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Feb 21 2023 12:56:05
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.87.0
	ngspice: 38
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_SPICE=ON

A little off the topic but after closing kicad 7, it continues to hang in the win 10 processes (task manager) you can see what behavior you have?

How is it on recent 7.99?

How is it on recent 7.99?

It’s hard to tell because I’m on a different faster laptop, so the version-comparison becomes more uncertain. I would say the speed has improved (v799 versus v7), it seems the " than another additional second with rotating hourglass" (from my text above) part has been removed. When I’m back on my (slower) working laptop I will update this answer (needs 2…3 days).

OK, I have a break and tested again on my working laptop (working on weekend - I need other/better assignments/clients…) with the last nightly. Included the old figures (from above) as comparison:

  • v6: needs ca. 0,9s on my machine until display of schematic subsheet_03
  • v7 (4 weeks old): needs ca. 1,4s on my machine until display of schematic subsheet_03, than another additional second with rotating hourglass.
  • v7 (actual Version: 7.99.0-443-g6a46dbd306, release build): has improved. Now needs 1,3s on this machine until display of schematic subsheet_03 (note: this 0,1s improvement could also be a measurement error). The main improvement: This time was previously followed by another 1second delay - this delay is now completely gone.

So I think there is a small regression left, but without proper in-program time measurement I can’t help anymore.

note: all measurements were taken with board editor closed - so my mentioned “cross-selection” is out of play here.

You could make a screen recording with a program like vokoscreen (for Linux) and then count the number of frames, or even just make a video recording with a phone of the monitor.

While searching for another topic on gitlab, I found the issue below. It may be more relevant then the “hierarchical” thing, but I have not tested it further.

Thanks, excellent catch!!
That seems to be it exactly. It’s not a hierarchical sheet problem. It’s a font problem! It’s just that it’s more easily seen when switching sheets.

I had set the default font to ‘Arial’ (but the same happens with any font other than the KiCad font.)
And I can confirm this is what makes opening sheets pretty slow. If I switch back to the KiCad font, it’s as fast as in v6, or close enough not to be noticeable.

Again, very good catch. We now know what needs to be improved specifically.

1 Like

I appreciate your appreciation, figuring out the slowdown took me quite a long time (seen in the many edits of that issue).
I probably set that default font to Arial at some point during 6.99 and forgot about it till it became an issue now.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.