Fetch polling change branch

Chris Young chris.young at unsatisfactorysoftware.co.uk
Mon Apr 15 20:10:02 BST 2013


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

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



More information about the netsurf-dev mailing list