[sword-devel] Performance tip: Multi-threaded update of remote sources

Troy A. Griffitts scribe at crosswire.org
Mon Jan 20 13:00:12 MST 2020

Thanks Tobias!  This is a great example we should include someplace
under sword/examples/  If you want to build a standalone example, I am
happy to include it.  I think it would be greatly beneficial to others. 
If you don't have time, I will try to get around to adding one soon,
using your supplied link.


On 1/6/20 1:58 AM, Tobias Klein wrote:
> Hi,
> Some time ago I found that the needed time for the update of remote
> sources can be dramatically reduced by using a multi-threaded approach.
> Instead of calling installMgr->refreshRemoteSource(source)
> sequentially for all sources this can be done in one thread for each
> remote source.
> Using this approach, the time for the remote source update is reduced
> from ~30 seconds to ~7 seconds, which is much nicer for the user,
> especially if it's done every time you open the "module install dialog".
> You can find an example for this here, using C++11 threads:
> https://github.com/tobias-klein/node-sword-interface/blob/0.106.0/src/sword_facade.cpp#L163
> Best regards,
> Tobias
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list