Page 1 of 1

How to improve designer's reaction time to gtk callback ?

Posted: Fri Mar 09, 2012 9:08 am
by ntarrin
Hello,

I'm creating a box which includes buttons to be used during scenario execution. What I do is changing some variables in the callback associated to the buttons, and then processClock consults these variables and do what has to be done accordingly.

Thus, I may wait up to 1/(box clock frequency) before something happens.

To improve speed, I can rise box clock frequency, but I would prefer the callback directly call a process function (no overall performance loss).

But :

1- gtk is C (impossible to convert 'overloaded-function' into 'GCallback'). Would using gtkmm can solve this problem ?

2- viewtopic.php?f=3&t=367&p=1652&hilit=gtk+callback#p1652.

Does someone have a better way to do this ?

Thanks.
Nicolas.

Re: How to improve designer's reaction time to gtk callback

Posted: Fri Mar 09, 2012 10:43 am
by yrenard
Nicolas,

just keep it simple, use a reasonably high frequency for the box (that is for instance 128 Hz which is the actual kernel frequency). Calling a processing function that does nothing most of the time will not hurt the overall performance as the kernel scheduler will always come as close as "ready to call this function" on a 128 Hz basis anyway.

Regards,
Yann

Re: How to improve designer's reaction time to gtk callback

Posted: Tue Mar 13, 2012 1:03 pm
by ntarrin
Ok Yann,

I'll keep it like that thus.

Thanks.
Nicolas.