[bt-devel] Excessive CPU consumption during module install
Martin Gruner
mg.pub at gmx.net
Tue Jul 7 23:15:08 MST 2009
Eeli,
can you do something about this?
mg
Am Dienstag, 7. Juli 2009 22:30:06 schrieb Greg Hellings:
> Jaak,
>
> On Tue, Jul 7, 2009 at 2:47 PM, Jaak Ristioja<Ristioja at gmail.com> wrote:
> > Hi!
> >
> > I've been able to reproduce this with 2.0.1. Here's part of a backtrace
> > for this situation:
> >
> > #0 0x00007fa2a733fe2c in sword::FileDesc::getFd () from
> > /usr/lib/libsword-1.5.11.so
> > #1 0x00007fa2a732e9cc in sword::SWConfig::Load () from
> > /usr/lib/libsword-1.5.11.so
> > #2 0x00007fa2a732f5e1 in sword::SWConfig::SWConfig () from
> > /usr/lib/libsword-1.5.11.so
> > #3 0x00007fa2a7332c3e in sword::SWMgr::loadConfigDir () from
> > /usr/lib/libsword-1.5.11.so
> > #4 0x00007fa2a7339fae in sword::SWMgr::Load () from
> > /usr/lib/libsword-1.5.11.so
> > #5 0x00000000004e6bcc in CSwordBackend::initModules ()
> >
> > #6 0x000000000055957e in instbackend::backend ()
> >
> > #7 0x0000000000560209 in BtInstallThread::BtInstallThread ()
> >
> > #8 0x0000000000562049 in
> > BtInstallProgressDialog::BtInstallProgressDialog ()
> >
> > #9 0x0000000000564fea in BtSourceWidget::slotInstallAccepted ()
> >
> >
> > It appears that the BtInstallProgressDialog constructor creates a
> > BtInstallThread for every work selected to be installed. The
> > BtInstallThread constructor calls instbackend::backend, which calls
> > CSwordBackend::initModules(), which calls sword::SWMgr::Load(). The
> > latter method takes most CPU time. Multiply that time with the number of
> > works selected and you got a huge delay.
>
> That definitely sounds like it is the source of the problem. I'm
> guessing that is done so that the download and install can be executed
> in parallel. Someone more familiar with that... is there a reason why
> we can't use a single thread to do the installs while another updates
> the GUI? Is parallel downloading and installing actually what's going
> on, and it is worth the performance increase? It sure doesn't seem
> that it is, to me!
>
> --Greg
>
> > Unfortunately I'm not familiar with the code, so I have been unable to
> > produce a fix. I hope you'll figure this out before 2.1. :)
> >
> > Blessings!
> > Jaak
> >
> > _______________________________________________
> > bt-devel mailing list
> > bt-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/bt-devel
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel
More information about the bt-devel
mailing list