On Tue, 2010-02-09 at 12:14 +0000, Rik Griffin wrote:
> Hi,
> 
> I've just subscribed to this list so this is partly a test message to see
> if things are working.

They appear to be, from this end :)

> Also, I've been investigating bug #1729711:
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=1729711&group_id=51719&atid=464312
> 
> 
> It seems that the status bar was being updated so frequently that when
> gui_multitask was called during a fetch, Wimp_Poll always returned
> immediately with a Wimp redraw window event, hence never yielding to other
> applications.

Lovely. Thanks for diagnosing this. It turns out that NetSurf's core is
somewhat over-zealous in updating the status bar during fetching. I've
committed a fix for the immediate issue as r9962. There are a few
additional fixes that the core code will need to fully fix the status
bar update situation:

1) html_object_callback will, in the worst case, update the status 
   bar twice per call. This needs further investigation.

2) The core's handling of mouse position could probably be more 
   intelligent, rather than recalculating everything each time the 
   position is updated. In the current implementation, it will update 
   the status bar and cursor every time a mouse movement is notified, 
   which is likely overkill.

I'm noting these here so they don't get forgotten -- I don't expect you
to go and fix them. You will, however, have to compile your own version
of r9962, as the autobuilder is disabled at the moment.

> My fix / quick hack, is to limit the frequency with with Wimp_ForceRedraw
> can be called on the status bar. I don't know the procedure for submitting
> changes to the repository, so I'll post it here:

Posting the output of "svn diff" to this mailing list is the best way.

> In file riscos.gui.status_bar/c : function ro_gui_status_bar_set_text :
> 
> Replace these lines:
> 
>   if (sb->visible)
>     xwimp_force_redraw(sb->w, 0, 0, sb->width - WIDGET_WIDTH, 65536);
> 
> With these:
> 
>   if (sb->visible) {
>     static clock_t last = 0;
> 
>     if (clock() > last + 50) {
>       xwimp_force_redraw(sb->w, 0, 0, sb->width - WIDGET_WIDTH, 65536);
>       last = clock();
>     }
>   }

As you've already noted, this rate limit should probably be applied on a
per-status bar basis. I think I'm inclined to hold off on committing
something like that until we've determined that the core changes don't
fully help.


J.


Reply via email to