Patch KIO::AccessManager

Thiago Macieira thiago at kde.org
Mon Aug 17 14:49:47 BST 2009


Em Segunda-feira 17 Agosto 2009, às 15:16:19, Dawit A. escreveu:
> On Monday 17 August 2009 04:09:53 Thiago Macieira wrote:
> > Em Domingo 16 Agosto 2009, às 14:31:01, Dawit A. escreveu:
> > > The attached patch changes KIO::AccessManager to schedule all the job
> > > requests it receives to prevent the explosion of kio_http process that
> > > can get spawned when many requests are made by an application all at
> > > once, e.g. rendering any moderately complex site.
> > >
> > > You can easily see this by using the webkitpart in Konqueror and
> > > visiting any moderately complex site. For example, before the patch
> > > visiting qt.nokia.com/developer spawns 21 kio_http processes where as
> > > only 2 are spawned with the patch. Actually the scheduler always seems
> > > to spawn only 2 processes per site.
> >
> > That's how it should be. I'm wondering why the explicitly scheduling is
> > necessary.
> >
> > Shouldn't all jobs be scheduled by default in KIO?
>
> Well KIO::Scheduler does schedule all jobs. However, it provides 3
> different scheduling modes.
>
> The default mode,  Direct, will not control how many jobs gets to be
> spawned. Rather it simply assumes the application will manage its requests
> appropriately and simply recycle an existing job if it can be reused to
> fulfill the request or create a new one. That however means that it does
> not cope very well, from the prespective ioslave spawning, when an
> application creates too many jobs in a short time span...

Reuse a job? I don't think you can do that.

You can reuse a slave, but since KIO::Slave is not public API, you can't do 
that.

> I guess the default choice assumes that most developers do not have a need
> to do that... In face the scheduler documentation explicitly states for
> devlopers to use the scheduled mode if they create many jobs and do not
> want to have an ioslave for each job.

Ok, makes sense to me then. Ship it.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090817/b5faa574/attachment.sig>


More information about the kde-core-devel mailing list