On Fri, May 27, 2011 at 1:08 PM, Jorge Arellano Cid <jcid@dillo.org> wrote:
On Fri, May 27, 2011 at 12:38:43PM -0500, reza farivar wrote:
On Fri, May 27, 2011 at 10:28 AM, Jorge Arellano Cid <jcid@dillo.org> wrote:
On Thu, May 26, 2011 at 03:42:04PM -0500, reza farivar wrote:
On Thu, May 26, 2011 at 3:18 PM, Johannes Hofmann
[...] Did you take special care to compile fltk-1.3 with X11 backend? If not, you might run the dillo as native Cocoa application. In that case you were more successful then me. For me dillo with Cocoa-fltk starts, but does not load any remote pages. There seem to be severe issues with the way fltk handles events in the Cocoa case.
Hmm, maybe I should try recompiling fltk with X11 backend...But my current native version is so close to working with no problems...
Yes, it's amazing how close it is from working native. Are plugins working OK? (e.g. can you browse the filesystem?)
Yes. Well, the only plugin I could see is the save button on the panel, and it can successfully navigate the filesystem and save a page correctly.
Do you know how to use gdb? It would be great to know in what functions the busy wait happens. It could be a timeout or anything. For this:
gdb ./dillo
<when locked on high CPU usage, hit Ctrl-c>
bt
Yes, Here's the result. I tried it a couple of times, and this looks like the culprit:
#13 0x000000010007d373 in do_queued_events () at style.hh:554 #14 0x000000010007ffa0 in fl_mac_flush_and_wait () at style.hh:554 #15 0x0000000100083c6f in Fl::run () at style.hh:554
This gets us on track!
Dig...
In fltk-1.3-rc6, Fl_mac.cxx, it says:
<quote>
/** * This public function handles all events. It wait a maximum of * 'time' secods for an event. This version returns 1 if events * other than the timeout timer were processed. * * \todo there is no socket handling in this code whatsoever */ int fl_wait( double time ) { do_queued_events( time ); return (got_events); }
</quote>
so it looks like when there're sockets to watch, there's a busy wait (because it sometimes work).
This is for the FLTK devs to answer.
Interesting find. Indeed if you look at FL_wait in FL_x.cxx, they issue a select system call that can identify socket events, while the mac version seems to only be a timeout based mechanism. I just emailed Manolo Gouy from FLTK (he seems in charge of the Mac section), and I'll let you know. BTW, FL_mac.cxx seems to be deprecated, and their most recent developments is in FL_cocoa.mm.
As a wild shot I'd try:
Fl_cocoa.mm:680 - time_to_wait = 0.0; + time_to_wait = 0.2;
Or set it to always 0.1 and see what happens.
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev