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

Making & changing box plugins and external apps
Post Reply
ntarrin
Posts: 18
Joined: Mon May 02, 2011 2:07 pm

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

Post 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.

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

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

Post 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

ntarrin
Posts: 18
Joined: Mon May 02, 2011 2:07 pm

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

Post by ntarrin »

Ok Yann,

I'll keep it like that thus.

Thanks.
Nicolas.

Post Reply