kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #11364
Re: Github plugin.
Hey I forgot to tell you yesterday that while moving the libs to GitHub, I
had to rename the "smd_crystal&oscillator" one since GitHub doesn't allow
the '&' character to be used. I called it "smd_crystal_and_oscillator", and
thus it will fail with any fp-lib-table based on the one I sent earlier,
which was tailored to the converted local files.
On Mon, Sep 30, 2013 at 11:19 PM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>
> On Sep 30, 2013 6:48 PM, "Wayne Stambaugh" <stambaughw@xxxxxxxxxxx> wrote:
> >
> > On 9/30/2013 5:39 PM, Dick Hollenbeck wrote:
> > > The GITHUB plugin is sluggish in the module viewer and here is why.
> The module viewer
> > > code is not making any effort to keep the current PLUGIN in RAM.
> > >
> > > This causes numerous unnecessary hits against GITHUB, only to retrieve
> information that
> > > should already be cached in the PLUGIN. Although an effort is made to
> cache a list of
> > > footprints, this is not the same as keeping the PLUGIN's cache, by
> keeping the PLUGIN
> > > alive for as long as the currently selected library is alive.
> > >
> > > Basically, it is a mess.
> > >
> > > I instrumented two API functions, FootprintEnumerate() and
> FootprintLoad() with printf()s
> > > which show the "this" pointer and aLibraryPath. At first I thought
> the problem was
> > > internal to GITHUB plugin, but it was not, and it will be a problem
> using ANY PLUGIN, not
> > > just GITHUB. Probably the KICAD_PLUGIN is a lot slower than it needs
> to be.
> >
> > I going have to rethink the how KICAD_PLUGIN keeps track of the
> > modification time of each file that is part of a library. I'm thinking
> > about moving it up into the FP_CACHE object instead of the FP_CACHE_ITEM
> > object. There may also be some issues with
> > wxFileName.GetModificationTime() using a remote connection. I thought I
> > had addressed the problem for local drives but apparently not. I'll
> > take a look at it as soon as I get a chance.
>
> Caching cleverness cannot survive cache deletion/destruction.
>
> Remember I said the *this* pointer is changing, this means the entire
> plugin is being deleted (any plugin and regardless of type) between
> FootprintLoad () calls by the library browser. The plugin needs to be
> attached to the FP_LIB_TABLE ROW so that it can stay alive and so that we
> can pass the PROPERTIES to each API call. I have this on my to do list as
> you can see. It is not my most urgent item, but now folks know why all
> plugins are operating at less than ideal efficiency.
>
> Improvements will come. And it is fairly low hanging fruit.
>
>
>
>
> >
> > Wayne
> >
> > >
> > >
> > >
> > > Here we get the list of footprints from aLibraryPath:
> > >
> > > FootprintEnumerate: this:0x220f7b0
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > >
> > > Here we cache the library info:
> > > cacheLib: this:0x220f7b0 m_lib_path:''
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > > and save the library path:
> > > cacheLib2: this:0x220f7b0 m_lib_path:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > >
> > >
> > > Here we load the first footprint, even though it is not shown yet.
> > > FootprintLoad: this:0x220f7b0 aLibraryPath:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > > Here we load it again, don't know why:
> > > FootprintLoad: this:0x220f7b0 aLibraryPath:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > > Re-cache the *entire* library information by hitting
> https://github.com again!
> > > (Please don't) Notice the "this" pointer has changed, somebody
> dropped the old
> > > PLUGIN pointer. This is the reason for the sluggishness.
> > > FootprintLoad: this:0x22119e0 aLibraryPath:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > > Cache the info
> > > cacheLib: this:0x22119e0 m_lib_path:''
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > cacheLib2: this:0x22119e0 m_lib_path:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > > Pick a new footprint in the UI, but too bad the PLUGIN is being
> reloaded AGAIN!
> > > FootprintLoad: this:0x21e12b0 aLibraryPath:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > cacheLib: this:0x21e12b0 m_lib_path:''
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > cacheLib2: this:0x21e12b0 m_lib_path:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > >
> > >
> > > Continue with the inefficient strategy:
> > >
> > > FootprintLoad: this:0x2224f60 aLibraryPath:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > cacheLib: this:0x2224f60 m_lib_path:''
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > cacheLib2: this:0x2224f60 m_lib_path:'
> https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > aLibraryPath:'https://github.com/CarlPoirier/BNC-Sockets_RevA'
> > > FootprintEnumerate: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > cacheLib: this:0x22376c0 m_lib_path:''
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > cacheLib2: this:0x22376c0
> > > m_lib_path:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22376c0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x2210ac0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > cacheLib: this:0x2210ac0 m_lib_path:''
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > cacheLib2: this:0x2210ac0
> > > m_lib_path:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > FootprintLoad: this:0x22357f0
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > cacheLib: this:0x22357f0 m_lib_path:''
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > cacheLib2: this:0x22357f0
> > > m_lib_path:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > > aLibraryPath:'
> https://github.com/CarlPoirier/Buzzer_Beeper_RevA_25Oct2010'
> > >
> > > _______________________________________________
> > > Mailing list: https://launchpad.net/~kicad-developers
> > > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > > Unsubscribe : https://launchpad.net/~kicad-developers
> > > More help : https://help.launchpad.net/ListHelp
> > >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References
-
Re: Github plugin.
From: Dick Hollenbeck, 2013-09-22
-
Re: Github plugin.
From: Brian Sidebotham, 2013-09-26
-
Re: Github plugin.
From: Dick Hollenbeck, 2013-09-26
-
Re: Github plugin.
From: Brian Sidebotham, 2013-09-29
-
Re: Github plugin.
From: Dick Hollenbeck, 2013-09-29
-
Re: Github plugin.
From: Brian Sidebotham, 2013-09-30
-
Re: Github plugin.
From: Carl Poirier, 2013-09-30
-
Re: Github plugin.
From: Dick Hollenbeck, 2013-09-30
-
Re: Github plugin.
From: Carl Poirier, 2013-09-30
-
Re: Github plugin.
From: Carl Poirier, 2013-09-30
-
Re: Github plugin.
From: Dick Hollenbeck, 2013-09-30
-
Re: Github plugin.
From: Wayne Stambaugh, 2013-09-30
-
Re: Github plugin.
From: Dick Hollenbeck, 2013-10-01