On Mon, Feb 07, 2011 at 03:28:05PM -0000, Richard Wilson wrote:
> Hi All,
> 
> The Windows' port currently never idles in gui_poll, causing it to use all
> available processing power. One solution is to update windows/schedule.c to

Thank you for reporting this issue. I have created a win32 TODO list
http://wiki.netsurf-browser.org/Todo/Win32 on the NetSurf wiki to keep
track, please feel free to extend this.

One thing to mention from our IRC discussions is that your native
build is currently unique and exhibiting some issues which are not
present in the cross compiled versions.

I currently test most often under wine (win 2k and xp profiles) and
a real Vista box but would welcome reports for other windows versions,
please do include this information explicitly as issues do appear to
be very different between windows editions.

> match it's framebuffer counterpart (to return the time until next scheduled
> event), and then simply extend gui_poll to:
> 

I have implemented a version of your proposed change which is more in
line with what is done in the framebuffer port (commited to SVN). 

In future it might help if you could you present your code as unified
diffs (diff -u) in mailing list posts as that helps to see whats
changed and means I can apply the proposed changes exactly.

A couple of points about your solution:

Timers appear to be repeating objects and a new instance is created if
the NULL hwnd is used. As we only require them to be one shot we need
to kill them if we create one. I verified by noting windows runs out
of timers for this application and cpu load goes to 100% with
repeating timer calls.

Because the scheduler can dispatch events which invalidate the active
flag passed to gui_poll() we must account for this by not blocking on
input when the schedule_run() call returns a non negative timeout.

> One thing to note here is that while the current scheduling code (see
> framebuffer/schedule.c) states that the time until next event is in
> centiseconds, it's actually milliseconds. Any comments?

yes the comments were wrong and incomplete, I have updated them to be
more comprehensive.

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

Attachment: signature.asc
Description: Digital signature

Reply via email to