kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #11362
Re: Github plugin.
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.
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
>
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