Wednesday, 2 July 2014

Re: Object fetchers moved to scheduled operation

On Wed, Jul 02, 2014 at 10:25:03AM +0100, Chris Young wrote:
>
>
> On 1 July 2014 09:25:38 BST, Vincent Sanders <vince@netsurf-browser.org> wrote:
>
> >The API has also been extended with fetcher_fdset() which allows the
> >fd sets of all active fetchers to be obtained for frontends that wish
> >to wait on fd activity instead of polling unnecessarily.
>
> I don't understand this. If it is scheduling the fetches rather than
> polling, I can ignore this, right? As I'm waiting for messages from
> the scheduler anyway?

Ok I need to explain this better as Michael asked too.

The fetchers are now completely run off the scheduler in a self
contained manner and not through a poll event in the main loop. While
there are active fetches a callback is repeatedly scheduled which
ensures all fetches are dispatched and the fetchers serviced.

This mode of operation is slightly more expensive than it strictly
needs to be as we service the fetchers even if they have no work to
do.

As an *extension* fetcher_fdset() exists. This allows a frontend to
obtain a set of file descriptors the fetchers are using. The frontend
may then wait for activity on those file descriptors in addition to
events from the windowing system. Thus only servicing the fetchers
when there is activity.

The fetch servicing occurs specifically when fetcher_fdset() is
called. In addition the polling is rescheduled to a "long" time in the
future (currently a second) rather than cancelled altogether. This
allows for the failure where a frontend is servicing scheduled events
but has failed to call fetcher_fdset() on further occasions.

>
> >Please can all frontend maintainers check I have not made a glaring
> >error on their platform as this is pretty invasive for such a small
> >cleanup. Especially ChrisY needs to check the amiga frontend as that
> >used to rely on a config to schedule curl directly which is no longer
> >present.
>
> Slight paranoia showing through :) but it is working bar the bug report I've raised.

It is not paranoia if they are out to get you! ;-) More seriously
though, you are the most responsive frontend maintainer and I feel bad
for potentially braking things for you because I cannot test. Please do
not think I do it deliberately!

Also I feel a bit guilty for how slow we were in integrating and
debugging the IDN changes (I hope its all settled down now). On that
note, if you have done with those branches now they are merged can you
do a bit of housekeeping and remove the unused branches from git?

> I should be able to check the reformat one tonight, would have done
> so yesterday but my Internet was playing up and (possibly unrelated)
> this email account wasn't receiving messages - so I didn't see it
> until this morning.

Thats fine, that one I am a bit suspect of, hence the not merging
yet. So no rush, hope your net connection improves.

>
> Chris
>

--
Regards Vincent
http://www.kyllikki.org/

No comments:

Post a Comment