Author |
Topic: LBB runs 7 times slower than LB on my GBRL-Sender (Read 1597 times) |
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #58 on: Dec 28th, 2017, 3:12pm » |
|
on Dec 28th, 2017, 2:25pm, xtal wrote:| Trying sleep just screws up many things , and you never goto [ckbuf] |
|
That doesn't make sense. Are you sure that you understood what I am suggesting? I want you to replace this single statement:
Code: with this short block of code:
Code:[waitnow]
SCAN
calldll #kernel32, "Sleep", 1 as long, r as void
goto [waitnow] This code is functionally the same as a WAIT statement. It isn't plausible that it can "screw up many things" or "never goto [ckbuf]". I can only assume that you have not made the code substitution correctly.
Quote:| I assume the end sub will bring me back to the next instruction. |
|
No. Have you never used a SUB event handler before - not even for a GUI event such as a button click? This is absolutely standard practice (indeed it is preferred over the branch label kind of handler in almost all circumstances). When using SUB handlers control returns to the WAIT statement - that is precisely why I think it might be helpful, because the WAIT gets executed once but never again.
Richard.
|
|
|
|
xtal
New Member
member is offline


Gender: 
Posts: 27
|
 |
Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #59 on: Dec 28th, 2017, 5:13pm » |
|
[quote author=Richard Russell
No. Have you never used a SUB event handler before - not even for a GUI event such as a button click? This is absolutely standard practice (indeed it is preferred over the branch label kind of handler in almost all circumstances). When using SUB handlers control returns to the WAIT statement - that is precisely why I think it might be helpful, because the WAIT gets executed once but never again.
Richard. [/quote]
I thought the wait was the next instruction.. Anyway Is there any way to pop the return off the stack? Code:
After correctly adding the sleep the speed increased
greatly on LBB run , but has +/- 2ms bounce
while LB run has +/- 0.3ms bounce
The LBB.exe has close to the same as LBB run, with
occasional spikes to 28ms
ManualTx WRITTEN ok ?Delay -NOT WRITTEN TicMS -NOT WRITTEN
LBB Run program with sleep
ManualTx WRITTEN ok ?Delay -NOT WRITTEN TicMS -NOT WRITTEN
Speed INCREASED a lot, but is bumpy +/-2MS
<12:46:05> <100> <1.657sec> <16.5msTIC>
<12:46:06> <100> <1.801sec> <18msTIC>
<12:46:08> <100> <1.773sec> <17.7msTIC>
<12:46:10> <100> <1.736sec> <17.3msTIC>
<12:46:11> <100> <1.685sec> <16.8msTIC>
<12:46:13> <100> <1.816sec> <18.1msTIC>
<12:46:15> <100> <1.762sec> <17.6msTIC>
<12:46:17> <100> <1.709sec> <17msTIC>
<12:46:18> <100> <1.688sec> <16.8msTIC>
<12:46:20> <100> <1.716sec> <17.1msTIC>
<12:46:22> <100> <1.764sec> <17.6msTIC>
<12:46:24> <100> <1.8sec> <17.9msTIC>
<12:46:26> <100> <1.763sec> <17.6msTIC>
<12:46:27> <100> <1.809sec> <18msTIC>
<12:46:29> <100> <1.867sec> <18.6msTIC>
<12:46:31> <100> <1.842sec> <18.4msTIC>
<12:46:33> <100> <1.749sec> <17.4msTIC>
<12:46:35> <100> <1.73sec> <17.2msTIC>
<12:46:36> <100> <1.771sec> <17.7msTIC>
<12:46:38> <100> <1.667sec> <16.6msTIC>
---DONE-1---
***************************************************************
LB Run program with sleep
ManualTx WRITTEN ok ?Delay -WRITTEN ok TicMS -WRITTEN ok
***************************************************************
Speed stable with +/-0.3ms
<12:51:46> <100> <1.562sec> <15.6msTIC>
<12:51:47> <100> <1.562sec> <15.6msTIC>
<12:51:49> <100> <1.568sec> <15.6msTIC>
<12:51:51> <100> <1.58sec> <15.7msTIC>
<12:51:52> <100> <1.558sec> <15.5msTIC>
<12:51:54> <100> <1.559sec> <15.5msTIC>
<12:51:55> <100> <1.567sec> <15.6msTIC>
<12:51:57> <100> <1.567sec> <15.6msTIC>
<12:51:58> <100> <1.555sec> <15.5msTIC>
<12:52:00> <100> <1.562sec> <15.6msTIC>
<12:52:02> <100> <1.569sec> <15.6msTIC>
<12:52:03> <100> <1.565sec> <15.6msTIC>
<12:52:05> <100> <1.571sec> <15.7msTIC>
<12:52:06> <100> <1.562sec> <15.6msTIC>
<12:52:08> <100> <1.56sec> <15.5msTIC>
<12:52:09> <100> <1.564sec> <15.6msTIC>
<12:52:11> <100> <1.563sec> <15.6msTIC>
<12:52:13> <100> <1.564sec> <15.6msTIC>
<12:52:14> <100> <1.579sec> <15.7msTIC>
<12:52:16> <100> <1.566sec> <15.6msTIC>
---DONE-1---
|
| « Last Edit: Dec 28th, 2017, 5:16pm by xtal » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #60 on: Dec 28th, 2017, 5:52pm » |
|
on Dec 28th, 2017, 5:13pm, xtal wrote:| Is there any way to pop the return off the stack? |
|
Not too sure what you mean. What are you trying to achieve? Quote:After correctly adding the sleep the speed increased greatly on LBB run , but has +/- 2ms bounce while LB run has +/- 0.3ms bounce |
|
By "bounce" do you mean 'jitter'? Jitter of that order is entirely to be expected.
If you are wanting LBB to behave identically to LB you are going to be disappointed. Indeed your other problems (font issues and 'non-displaying' textboxes) are caused by you making insufficient allowance for predictable variations between platforms, and you would likely see similar 'failures' if you ran your program in LB but under Wine rather than Windows. Even a different version of Windows or a different 'theme' setting might be sufficient. Modifying your code so that it works in LBB as well as LB will make it generally more reliable! 
Can we draw this thread to a close now?
Richard.
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #61 on: Dec 28th, 2017, 6:01pm » |
|
I have locked this thread because the original reported issue ("LBB runs 7 times slower than LB") has been resolved. Other issues are best raised in a new thread.
Richard.
|
|
|
|
|