pcbnew: no feedback while "searching" for a module

Bug #1272638 reported by Engidea
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Wishlist
Unassigned

Bug Description

Action: in pcbnew you may wish to add a module to a pcb by searching for it

What happens: when the "list all" button is pressed pcbnew freezes

What is possibly happening: Having libraries on github is great but the there is a need of some feedback while the downloading is running otherwise a user may thing something is broken
It is probabl best also to give some sort of cancel button for when connection is slow

Application: Pcbnew
Version: (2014-01-24 BZR 4632)-product Release build
wxWidgets: Version 2.8.12 (release,Unicode,compiler with C++ ABI 1002,GCC 4.6.3,wx containers,compatible with 2.6)
Platform: Linux 3.5.0-45-generic i686, 32 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : RE: [Bug 1272638] [NEW] pcbnew: no feedback while "searching" for a module

How long does it take for you worst case?

(For me it is 8 to 14 seconds.)  The simplest solution is for you to carefully trim down the library list or not use load all, instead browse by library.  There libraries you are certainly not interested in.

An hour glass icon would be good, or a progress bar would be good.

But a A cancel button I do not think can be coded easily because about twenty separate threads are out working concurrently on missions which are not cancellable.

For now, use the two work arounds, maybe in the future some of this will get done in the background.

It will always be possible to create a situation where response is slow by adding enough libraries.  So sub-setting is your friend.

Sent from my Galaxy S®III

-------- Original message --------
From: Engidea <email address hidden>
Date:01/25/2014 3:33 AM (GMT-06:00)
To: <email address hidden>
Subject: [Bug 1272638] [NEW] pcbnew: no feedback while "searching" for a module

Public bug reported:

Action: in pcbnew you may wish to add a module to a pcb by searching for
it

What happens: when the "list all" button is pressed pcbnew freezes

What is possibly happening: Having libraries on github is great but the there is a need of some feedback while the downloading is running otherwise a user may thing something is broken
It is probabl best also to give some sort of cancel button for when connection is slow

Application: Pcbnew
Version: (2014-01-24 BZR 4632)-product Release build
wxWidgets: Version 2.8.12 (release,Unicode,compiler with C++ ABI 1002,GCC 4.6.3,wx containers,compatible with 2.6)
Platform: Linux 3.5.0-45-generic i686, 32 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

** Affects: kicad
     Importance: Undecided
         Status: New

** Tags: githublib pcbnew

--
You received this bug notification because you are a member of KiCad Bug
Squad, which is subscribed to KiCad.
https://bugs.launchpad.net/bugs/1272638

Title:
  pcbnew: no feedback while "searching" for a module

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1272638/+subscriptions

Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :

Thanks Dick

I understand that reducing the libraries reduces the unresponsive time, however I am just reminding the following gnerelally accepted GUI gidelines
- GUI should never be unresponsive, the user should have a clear idea of what is happening
- GUI should never be left hanging out without a cancel possibility (immagine a network connection goes down)

I am just wondering, would it be possible to update the local library using plain and simple git and just telling to kicad where the local "repository copy" is ?

Please take my observation as a positive remark, I do not wish to criticise your work in any way

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : RE: [Bug 1272638] Re: pcbnew: no feedback while "searching" for a module

You did not answer my question.

Sent from my Galaxy S®III

-------- Original message --------
From: Engidea <email address hidden>
Date:02/01/2014 5:30 AM (GMT-06:00)
To: <email address hidden>
Subject: [Bug 1272638] Re: pcbnew: no feedback while "searching" for a module

Thanks Dick

I understand that reducing the libraries reduces the unresponsive time, however I am just reminding the following gnerelally accepted GUI gidelines
- GUI should never be unresponsive, the user should have a clear idea of what is happening
- GUI should never be left hanging out without a cancel possibility (immagine a network connection goes down)

I am just wondering, would it be possible to update the local library
using plain and simple git and just telling to kicad where the local
"repository copy" is ?

Please take my observation as a positive remark, I do not wish to
criticise your work in any way

--
You received this bug notification because you are a member of KiCad Bug
Squad, which is subscribed to KiCad.
https://bugs.launchpad.net/bugs/1272638

Title:
  pcbnew: no feedback while "searching" for a module

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1272638/+subscriptions

Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :

25seconds for quite a few libraries (converted from another project)

I am on a slow connection 1.5Mbit download (far from switchboard)

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

On 02/01/2014 08:51 AM, Engidea wrote:
> 25seconds for quite a few libraries (converted from another project)
>
> I am on a slow connection 1.5Mbit download (far from switchboard)

Thank you, that was a helpful data point. (My internet data rate is exactly the same as
yours.)

We need two more data points, then I can best answer your question.

1) Please attach your two fp-lib-table files, the one from ~/fp-lib-table and the one from
your project dir. To this bug report. (See add attachment or patch at bottom of web
page.) Also back them up for next step.

2) a) Pull up your ~/fp-lib-table into a text editor.
b) Remove every (lib ...) line which has (type Github) in it, by deleting with text editor.
c) Save to disk.
d) Start pcbnew, do the List All again, and time it again. Let me know the time.

With these two additional pieces of information, I can best help chart a helpful path
forward, there are a number of options I am considering.

After you have the time data point for 2), then restore your ~/fp-lib-table from the saved
off file, or from the website from 1).

I would also be curious as to the approximate size of the converted libraries, about how
many footprints per library.

Dick

Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :
Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :
Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :

This is what I did
listall with the attached fp_lib_table. It takes much less now (I must have been downloading something in parallel earlier on, sorry) something around 16 seconds. It does report an error that I attached
If I remove all github then it complains immediately that there are no libraries defined

note that this is a project that I normally work on and from time to time try to open with the current version, I do not do "real" work on it, just try some routing or placing

Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :

There is no fp_lib_table in the project dir

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

On 02/01/2014 01:46 PM, Engidea wrote:
> ** Attachment added: "Error I get when I do a component listall from pcbnew"
> https://bugs.launchpad.net/kicad/+bug/1272638/+attachment/3965629/+files/pcbnew-listall-error.txt
>

Looks like your DNS server is being overwhelmed by the number of concurrent threads all
ganging up on it at the same time. It may have a limit as to how many it can handle
"concurrently". I base this on the observation that it is not the first entry that is
failing.

A) In general, you should have more than one entry in your /etc/resolv.conf file, one for
a DNS server and one for a backup DNS server, the backup having a different IP address.

B) Even better, let's take the DNS server out of the picture, by hard coding the machine
name and IP address for the github machine, into your /etc/hosts file. i.e. add this line
into your /etc/hosts file:

   192.30.252.147 codeload.github.com

If that helps, maybe we should do this in the plugin, just skip the DSN lookup and use the
IP address directly.

Seems to speed things up for me with Github plugin type.

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

> I am just wondering, would it be possible to update the local library
> using plain and simple git and just telling to kicad where the local
> "repository copy" is ?

See the script <src>/scripts/library-repos-install.sh

The first time you run it use the --install-prerequisites option.

Then --install-or-update

Then read the top about swapping your ~/fp-lib-table, and setting an environment variable,
which can be done by editing

   /etc/profile.d/kicad.sh

and logging out and back in again.

Revision history for this message
Engidea (e-launchpad-net-engidea-com) wrote :

I can confirm your advice #10

Adding
192.30.252.147 codeload.github.com
to /etc/hosts results in the libraries being loaded, good !
(the gui is still unresponsive for some time, but that is another issue)

My internet setup is quite common, the usual router DSL that is "proxy" for everything, including DNS
I suspect that this issue will crop up a few more times since this is what most people have

thanks for your advice #11

I normally use the kicad-install.sh and I surely missed the further info on library handling

Thanks

tags: added: github-plugin
removed: githublib
Revision history for this message
Novak Tamas (novak-7) wrote :

I revive this old thread. Problem still exist in nightly 7060, OpenGL, Win7/x64.
In pcbnew
- click Add footprint
- click List all
At this point crosshair cursor gets frozen (mouse arrow pointer still moving) for abt 6-8 seconds. For a couple seconds Windows7 also displays a "Not responding" text in pcbnew's titlebar!!
The footrpint list appears after that delay.

If slow net connection prolongs this to 20-30seconds, impatient user may kick "frozen" pcbnew out.

It's a righteous wish having some kind of info (message display, progessbar, hourglass...) of what is happening..

Changed in kicad:
status: New → Triaged
importance: Undecided → Wishlist
Jeff Young (jeyjey)
Changed in kicad:
status: Triaged → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
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.