Monday, 15 April 2013

Fetch polling change branch

All

I've just created a branch chris/scheduled-fetches because currently
when downloading, NetSurf runs in a busy loop fetching data. This
really slows down the whole system ounder AmigaOS because NetSurf ends
up hogging most of the processor time.

In the branch I've changed the main loop so it schedules itself
to do an immediate hlcache_poll, rather than directly calling
hlcache_poll itself. This means that operating systems with something
like Wait(), which will wait for an event to come in, eg. for one
of NetSurf's scheduled tasks, will be able to use Wait() rather than
dropping out of gui_poll and letting NetSurf busy-loop, and be a bit
more multi-tasking friendly. It is certainly working well here, with
a minor change to ignore gui_poll's "active" flag.

I'm not sure what implications this has for other platforms we target.
I don't see that it would cause any problems, as the only real change
is that schedule() calls hlcache_poll() rather than the main loop
doing it - unless there are some hidden reasons why that is a bad
idea?

Ideally I'd like to see this in 3.0 if possible, as it has solved
something that has been bugging me for ages!

Thoughts?

Chris

No comments:

Post a Comment