does keyboard slows down the code?
hello.

i was doing some tests to speed up my code, and i realized that having a keyboard in the code slows it down, even if the keyboard is actually never hit.

here's a code to check it:

 % speed test
 a = rand;
 
 tic
 for i = 1:1e4
 if a == 0
 keyboard
 end
 end
 toc
 
 
 tic
 for i = 1:1e4
 if a == 0
 b = 5^2;
 end
 end
 toc

elapsed time is 0.000195 seconds.

elapsed time is 0.000025 seconds.

how can this be possible?
its to do with the jit optimisation, the same is true if you insert conditional debug statement in the code, matlab needs to prepare to stop execution.
[image] ryan\_blything:

i have difficulty understanding why (since ultimately, rts should be dependent on keyboard press rather than frame rate).

builder experiments are structured around a drawing loop and event cycle that is driven by the screen refresh rate. so the keyboard is checked once … hi there,

i am making some assumptions about the requirements of your experiment here but lets see if this helps.

short break

would you like the short break to be at the start of each trial ? i.e. the inter-trial-interval? if so try the following:

add a code component to your “trial” routine (c… hi,
thanks that does help tremendously! what you're dealing with is a "wait until ready" timeout condition. in other words test studio timed out waiting for the browser to say "i'm done downloading and rendering all the data for this website". there is a global setting for this which has a default value of just 30 seconds. it is the "client ready timeout" setting as shown in the [last figure on this page](http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/test-execution/quick-execution.aspx) for quick execution. an equivalent setting exists in [the test list settings](http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/test-execution/test-list-settings.aspx) when running your tests as part of a test list..  

  

if you don't want to set it globally (which can make sense to have the timeout much shorter for the remainder of your test) you'll have to resort to performing your navigate step in code... but it's pretty easy. try this:  

  


`int` `oldvalue = manager.settings.clientreadytimeout;`
`manager.settings.clientreadytimeout = 360000;`
`activebrowser.navigateto(``"my website here"``);`
`manager.settings.clientreadytimeout = oldvalue;`




kind regards,  

 cody   

the telerik team


do you want to have your say when we set our development plans?
do you want to know when a feature you care about is added or when a bug fixed?
explore the [telerik public issue tracking](http://www.telerik.com/support/pits.aspx)
system and vote to affect the priority of the items if response.keys: # if the list is not empty

border.opacity = 1 # needs to be reset on each trial

if response.keys[0] == ('f'):

border.pos = [-0.3, 0]

elif response.keys[0] == ('j'):

border.pos = [0.3, 0]

else:

border.opacity = 0

else:

continueroutine = fa… not aware of any specific reason why it wouldn't work. whether it will hinder performance depends on what you're going to do. a quick fix is to go into the "device manager" Start-settings-control panel-system-device manager and right click on your keyboard and select delete. when it's deleted restart your pc. You will not be able to use your keyboard until it is reinstalled by your computer let it start up and you will see a little come up that wil say something like found new hardware or found new keyboard. after this you should be able to use as you used to there is no update from you for a period, assuming this is not an issue any more.

hence we are closing this topic. if need further support, please open a new one.

thanks

what’s the frame rate? have you try boost the system to performance mode to try? you write an int, but try to receive a c-string, that can not work.

the radio will not be available (i.e. have a packet received) 99.9% of the time,

introducing a delay and printing something if that is the case is just crazy.

so your code seems to be copy and pasted crap without any understandin… (a) to my eye, they never have a common speed. that would require the two curves to have the same slope at the same time, which doesn't appear to me to be true.

(b) b is ahead of a but is slowing down and being passed by a, which has been moving at constant speed.

(c) b has an acceleration with greater magnitude. (in fact, the curve for a doesn't show any acceleration at all.)

(d) a has a constant slope, and therefore a constant velocity (and therefore displays no acceleration at all). b starts ahead of a initially with a velocity greater, but then decelerates as it nears t = 4 s. at around t = 3.7 s, b's velocity (slope) has nearly dropped to zero, and it gets passed by a.

if you find this helpful, please select favorite answer! hi tomica, - - i can suggest that you try the following: -     - remove all of the styles to see whether some specific css is affecting the buttons appearance. -     - upgrade to latest telerik ui version - 2015.2.826 - if the above steps, however, do not help it would be better to provide us with a runnable sample that reproduces the issue, so that we can investigate it further. - - regards, - danail vasilev - telerik - - do you want to have your say when we set our development plans? - do you want to know when a feature you care about is added or when a bug fixed? - explore the - telerik feedback portal - and vote to affect the priority of the items -