Don't update 3D view when it is not visible or doesn't have input focus

Bug #1785396 reported by Oleg Endo
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
KiCad
New
Unknown

Bug Description

Currently (development master branch) the 3D view is always updated whenever a change to the board is made in pcbnew. Even if the 3D view window is not visible. I remember this used to be different some time ago. The 3D view was only updated when it was actually visible or when it gained input focus.

The old behavior was extremely useful when working with a 3D view on the side. It allows editing the board and quickly get a feedback in the 3D view.

With the current behavior, every edit step in pcbnew takes several seconds because it always updates the 3D view. This makes board editing with the 3D view being opened pretty much impractical even for smaller boards. The only solution is to close the 3D view and open it again to see the results. However, for larger boards the initial loading of all the 3D models takes long time.

Tags: 3d-viewer
Revision history for this message
John Beard (john-j-beard) wrote :

Or at least, when the 3D window is visible, say on another monitor, don't block pcbnew when updating the 3D view, just post it updates and let it re-render as best it can.

Revision history for this message
Oleg Endo (oleg.endo) wrote :

Yeah, that'd be even better actually, but more difficult to implement (I'm guessing, I don't know the kicad codebase). Of course the 3D view should not blindly update itself N times if it has received N update requests from pcbnew. If it can, it should cancel its updating process when it receives a new update request and restart it.

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

I think we can probably make "auto-update" an option in the viewer

Changed in kicad:
importance: Undecided → Low
milestone: none → 5.1.0
status: New → Triaged
Revision history for this message
Oleg Endo (oleg.endo) wrote :

If there's an auto-update option, but updates are as slow (and app-blocking) as now, I bet most people will have the auto-update just disabled. At which point it turns into a "push a key to refresh" kind of thing.

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

The updates are very fast for me and I don't notice them unless I have a broken edge cuts. This may be os/setup dependent.

The updates definitely shouldn't be app-blocking.

Revision history for this message
Oleg Endo (oleg.endo) wrote :

I guess it also depends on the board size and complexity?

For example, I've got something around 210 mm x 300 mm with 10K pads, 4K vias, 40K track segments, 2K parts. Changing anything on the board with the 3D view open freezes all editor sub-programs until the 3D view has finished reloading (I'm on Ubuntu).

This makes every edit take around 40 seconds. That is slow :)

tags: added: 3d-viewer
Revision history for this message
Mario Luzeiro (mrluzeiro) wrote :

Here are some tips to speedup the reload, until this is not fixed:
- Use OpenGL render engine.

On Preferences, Display Options:
- Check "Realistic mode": it will only compute top and bottom copper layers.
- Uncheck "Show copper thickness": it will not calculate polygons contours. Visually there is little difference.
- Uncheck "Show filled areas in zones": this will be a major speedup in boards that have complex polygon shapes.
- If you do not care about the other layers, they ca also be disabled too, eg: solder paste, etc.

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

Not critical for 5.1, moving to 6

Changed in kicad:
milestone: 5.1.0 → 6.0.0-rc1
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/1855

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Low → Unknown
status: Expired → New
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.