Re: FXDataTarget & widget value update delay

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: FXDataTarget & widget value update delay

by Björn Bergqvist :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
this was an old thread but I noticed a significant speedup with
"app.disableThreads"
Ruby version 1.9.1p243, fxruby (1.6.19), Linux 32-bit (ArchLinux).

Thanks!

Björn Bergqvist
http://www.discretizer.org

2006/10/3 Lyle Johnson <lyle@...>:

>
> On Oct 3, 2006, at 10:34 AM, Philippe Lang wrote:
>
>> When assigning a new value to an FXDataTarget programmatically, it
>> takes a certain time for the widget linked to this FXDataTarget to
>> be updated, just as if there was some sort of "polling" inside the
>> framework. Delay can be as long as 1 second sometimes. Why aren't
>> the widgets updated straight away?
>
> The update of a widget's settings due to a change in a data target's
> value is handled by FOX's GUI update mechanism, described here:
>
>        http://www.fox-toolkit.org/guiupdate.html
>
> This process only kicks in during idle time in the GUI, so there's
> inevitably going to be some small delay. The problem is compounded in
> FXRuby due to the overhead required for converting back and forth
> between C++ objects and Ruby objects, as well as scheduling Ruby
> threads. If your FXRuby application doesn't use any threads, you can
> try turning off FXRuby's support for scheduling Ruby threads by
> calling the FXApp's disableThreads() method:
>
>        app.disableThreads
>
> Yet another option, but one which sort-of defeats the purpose of the
> GUI update process, is to call forceRefresh() directly whenever you
> make a change to the data target's value, e.g.
>
>        datatarget.value = "Foo"
>        app.forceRefresh
>
> Calling forceRefresh() causes the application to immediately start
> the GUI update process without waiting for idle time.
>
> Hope this helps,
>
> Lyle
> _______________________________________________
> fxruby-users mailing list
> fxruby-users@...
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXDataTarget & widget value update delay

by dglnz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wouldn't this be due to ruby 1.9.x using OS threads as apposed to software ("green") threads?

note: not used threads but am thinking i shall be needing them sooner than later for my project.

Dave.

--- On Sat, 10/10/09, Björn Bergqvist <bjorn.bergqvist@...> wrote:

From: Björn Bergqvist <bjorn.bergqvist@...>
Subject: Re: [fxruby-users] FXDataTarget & widget value update delay
To: fxruby-users@...
Received: Saturday, 10 October, 2009, 6:58 AM

Hello,
this was an old thread but I noticed a significant speedup with
"app.disableThreads"
Ruby version 1.9.1p243, fxruby (1.6.19), Linux 32-bit (ArchLinux).

Thanks!

Björn Bergqvist
http://www.discretizer.org

2006/10/3 Lyle Johnson <lyle@...>:

>
> On Oct 3, 2006, at 10:34 AM, Philippe Lang wrote:
>
>> When assigning a new value to an FXDataTarget programmatically, it
>> takes a certain time for the widget linked to this FXDataTarget to
>> be updated, just as if there was some sort of "polling" inside the
>> framework. Delay can be as long as 1 second sometimes. Why aren't
>> the widgets updated straight away?
>
> The update of a widget's settings due to a change in a data target's
> value is handled by FOX's GUI update mechanism, described here:
>
>        http://www.fox-toolkit.org/guiupdate.html
>
> This process only kicks in during idle time in the GUI, so there's
> inevitably going to be some small delay. The problem is compounded in
> FXRuby due to the overhead required for converting back and forth
> between C++ objects and Ruby objects, as well as scheduling Ruby
> threads. If your FXRuby application doesn't use any threads, you can
> try turning off FXRuby's support for scheduling Ruby threads by
> calling the FXApp's disableThreads() method:
>
>        app.disableThreads
>
> Yet another option, but one which sort-of defeats the purpose of the
> GUI update process, is to call forceRefresh() directly whenever you
> make a change to the data target's value, e.g.
>
>        datatarget.value = "Foo"
>        app.forceRefresh
>
> Calling forceRefresh() causes the application to immediately start
> the GUI update process without waiting for idle time.
>
> Hope this helps,
>
> Lyle
> _______________________________________________
> fxruby-users mailing list
> fxruby-users@...
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new email address.
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users