← Back to team overview

kicad-developers team mailing list archive

Re: Fwd: [PATCH] github_plugin -> curl -> openssl thread safety

 

On 1/13/2016 12:20 PM, Adam Wolf wrote:
> I can test this on OS X this week.

Thanks.

> 
> (I am excited for Jon's git plugin roadmap.  If Github works well for
> other people, awesome, but I am not a fan of depending on proprietary
> software, and based on the chatter on the email list and Dick's
> suggestion that users install and configure a webserver/caching
> proxy/modify /etc/hosts suggests to me we have room for improvement.)

Please keep in mind, nginx is just a suggestion not a demand.  This is
how Dick resolved his github performance issues.  It is not a shooting
offense.  I would suggest that if your not interested in using some type
of caching proxy such as nginx that you clone the footprint repos to
your hard drive and configure your fp-lib-table accordingly.  No one is
being force to use anything they are not comfortable using.  Without
some type of caching, the github plugin will only ever be as fast as
your internet connection no matter how well we optimize the code.

A git plugin could be interesting.  We'll see how it pans out in
practice.  The only thorny issue may be using the git library depending
on the platform.

> 
> Adam Wolf
> Cofounder and Engineer
> W&L
> 
> On Wed, Jan 13, 2016 at 11:01 AM, Wayne Stambaugh
> <stambaughw@xxxxxxxxxxx <mailto:stambaughw@xxxxxxxxxxx>> wrote:
> 
>     Would someone please test this patch on osx and on a linux distro that
>     uses a libcurl variant built against ntls or gnutls.  I will test it on
>     windows.  Please read the comments below carefully and do not reply to
>     Dick directly.
> 
>     -------- Forwarded Message --------
>     Subject: [PATCH] github_plugin -> curl -> openssl thread safety
>     Date: Wed, 13 Jan 2016 00:07:35 -0600
>     From: Dick Hollenbeck <dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>>
>     To: Wayne Stambaugh <stambaughw@xxxxxxxxxxx
>     <mailto:stambaughw@xxxxxxxxxxx>>, jp.charras@xxxxxxxxxx
>     <mailto:jp.charras@xxxxxxxxxx>
>     <jp.charras@xxxxxxxxxx <mailto:jp.charras@xxxxxxxxxx>>
> 
>     Guys, this brings in the necessary locks required to make openssl thread
>     safe. I think it completes the migration to libcurl.  As I reported to
>     Wayne, even on linux I was seeing evidence of unprotected critical
>     sections of code.  Going down to 6 threads merely swept the problem
>     under a rug but did not fix the fundamental problem.  This does.
>     Six threads still seems about the optimal mix of chaos and throughput.
> 
>     You may want to bring back the FindOpenSSL.cmake script which this must
>     use, but I got by with CMake's default.  Please just do that as a
>     separate patch since I am not responsible for it.  You could also do any
>     Windows specific fixups as a separate patch also, as it does not
>     attribute stuff to me that I did not do, and vice versa.
> 
>     HTH in fulfilling your vision for the github plugin.  The locking does
>     not affect the speed by much, and multiple threads are still a
>     tremendous speed boost.  I still would never use the plugin without
>     nginx, and I think that should be made more clear to those who wine
>     about speed.  There is an awful lot of whining, and none of these people
>     even seem to know about nginx.  nginx + github plugin is even faster
>     than the PCB_IO plugin.
> 
>     I think I am loading about 80 libraries in 2 seconds.  Only two of those
>     are PCB_IO, the rest are github.
> 
>     PLEASE MAKE THIS KNOWN!
> 
> 
>     *) Switch to static linking of libcurl and on linux and windows and also
>        statically link in only required portions of openssl.
>     *) Add the required thread locks which openssl needs.
>     *) Remove the get curl version call from BASEFRAME since it pulls in
>     curl and openssl
>        into every derived wxFrame class link image.
>     *) Remove curl function from PGM_BASE, switch to atexit() instead.
>     Anything in PGM_BASE made the singletops bigger.
>     *) Tested on Linux only.
> 
> 
>     _______________________________________________
>     Mailing list: https://launchpad.net/~kicad-developers
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~kicad-developers
>     More help   : https://help.launchpad.net/ListHelp
> 
> 



Follow ups

References