DCPushButtonXP is slow if I use the Hide option
DCPushButtonXP is slow if I use the Hide option
Hi Roger!
I hope you're well.
I have noticed that if I use the HIDE Option in the DcPushBuutonXP command, the button's reaction is very slow.
This takes performance and speed away from touch keyboards and gives an aspect of slowness.
If you have 10 buttons without the HIDE option, you can click on all of them, as the reaction speed is normal.
but if the buttons have the HIDE option, the reaction is very slow.
Can you please check this situation.
many Thanks..
eXpress 267 and xB 2.0.1176
I hope you're well.
I have noticed that if I use the HIDE Option in the DcPushBuutonXP command, the button's reaction is very slow.
This takes performance and speed away from touch keyboards and gives an aspect of slowness.
If you have 10 buttons without the HIDE option, you can click on all of them, as the reaction speed is normal.
but if the buttons have the HIDE option, the reaction is very slow.
Can you please check this situation.
many Thanks..
eXpress 267 and xB 2.0.1176
Pedro Alexandre
Re: DCPushButtonXP is slow if I use the Hide option
Did you try any HIDE clause (like just {||.T.} or {||.F.}, without any other conditions)? Maybe the evaluation of the codeblock takes so much time - (cascading iterations and dependencies). I can't confirm DCPUSHBUTTONXPs are slow with HIDE clause. They must be a little slower when getting painted since ownerdrawing is used, but not that much. Can you track on a button how often the HIDE clause is evaluated?
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCPushButtonXP is slow if I use the Hide option
I agree with Tom.
You need to test your hide code block.
The below code is very simple and contains nothing that should affect the performance.
You need to test your hide code block.
The below code is very simple and contains nothing that should affect the performance.
Code: Select all
METHOD DC_XbpPushButtonXP:WhenHideEval( lEnable, lShow, lProtect, nMode )
IF Valtype(::whenBlock) = 'B' .AND. ::parent:isEnabled()
lEnable := Eval(::whenBlock,self)
IF lEnable
IF !::isEnabled()
::enable()
ENDIF
ELSE
IF ::isEnabled()
::disable()
ENDIF
ENDIF
ENDIF
IF Valtype(::hideBlock) = 'B'
lShow := !Eval(::hideBlock,self)
IF lShow
::show()
ELSE
::hide()
ENDIF
ENDIF
IF Valtype(::protectBlock) = 'B'
lProtect := Eval(::protectBlock,self)
ENDIF
RETURN self
The eXpress train is coming - and it has more cars.
Re: DCPushButtonXP is slow if I use the Hide option
I thank you in advance for your availability.
But it turns out that I register a performance deficit when I use the Hide option in DCPushButtonXP.
My scenario is as follows, I have an application for bars and restaurants that has more than 500 buttons divided into tabs.
When I use the option "Hide" in the command "DcpushButtonXP" the application is very slow.
The application installed on an Intel J1900 processor, which is the most common in POS, is very slow and impossible to use.
Attached is an example that reproduces the problem.
If you disable the Hide option, everything is OK.
Not long ago there was also an evident slowness in creating the buttons, but Roger did an optimization and the problem was solved.
Try use this sample and try to be fast to click the buttons ..
But it turns out that I register a performance deficit when I use the Hide option in DCPushButtonXP.
My scenario is as follows, I have an application for bars and restaurants that has more than 500 buttons divided into tabs.
When I use the option "Hide" in the command "DcpushButtonXP" the application is very slow.
The application installed on an Intel J1900 processor, which is the most common in POS, is very slow and impossible to use.
Attached is an example that reproduces the problem.
If you disable the Hide option, everything is OK.
Not long ago there was also an evident slowness in creating the buttons, but Roger did an optimization and the problem was solved.
Try use this sample and try to be fast to click the buttons ..
- Attachments
-
- ButSlow.rar
- (81.5 KiB) Downloaded 569 times
Pedro Alexandre
Re: DCPushButtonXP is slow if I use the Hide option
Your problem is not the HIDE clause.
It is a problem in the ACTION that is causing the slowness.
This was reported by another customer earlier this year because it only showed on some slow computers.
That problem was fixed in the attached file.
Copy _DCXBUTT.PRG to your \exp20\source\dclipx folder.
Rebuild DCLIPX.DLL by running BUILD20.BAT
It is a problem in the ACTION that is causing the slowness.
This was reported by another customer earlier this year because it only showed on some slow computers.
That problem was fixed in the attached file.
Copy _DCXBUTT.PRG to your \exp20\source\dclipx folder.
Rebuild DCLIPX.DLL by running BUILD20.BAT
- Attachments
-
- _dcxbutt.zip
- (22.92 KiB) Downloaded 602 times
The eXpress train is coming - and it has more cars.
Re: DCPushButtonXP is slow if I use the Hide option
Roger,
Did you execute the sample I sent as an attachment?
The buttons have no "action" option!
Try clicking on several buttons in a row and quickly!
you will see that there is a very slow delay.
Then remove the HIDE options and test again.
The button's behavior is totally different, fast, normal ..
Can anyone else test run this sample and confirm if it identifies the situation?
Many Thanks!
Did you execute the sample I sent as an attachment?
The buttons have no "action" option!
Try clicking on several buttons in a row and quickly!
you will see that there is a very slow delay.
Then remove the HIDE options and test again.
The button's behavior is totally different, fast, normal ..
Can anyone else test run this sample and confirm if it identifies the situation?
Many Thanks!
Pedro Alexandre
Re: DCPushButtonXP is slow if I use the Hide option
Did you rebuild your dclipx.dll with the file I sent?
What version of Xbase++ are you using?
Do you need me to send you a dclipx.dll ?
What version of Xbase++ are you using?
Do you need me to send you a dclipx.dll ?
The eXpress train is coming - and it has more cars.
Re: DCPushButtonXP is slow if I use the Hide option
Roger,
Of course I compiled dclipx.
Doesn't this behavior happen to you?
My Xbase version is 2.0.1185
Do me a favor and watch the attached video and test it with the attached program sample.
Of course I compiled dclipx.
Doesn't this behavior happen to you?
My Xbase version is 2.0.1185
Do me a favor and watch the attached video and test it with the attached program sample.
- Attachments
-
- Video.rar
- (4.72 MiB) Downloaded 522 times
-
- TecTouch.rar
- (13 KiB) Downloaded 627 times
Pedro Alexandre
Re: DCPushButtonXP is slow if I use the Hide option
Your program has 1040 owner-drawn pushbuttons and each one has a hide code block.
It means that every time you click a button, 1040 code blocks need to be run and each button needs to be redrawn.
This is a lot of owner-drawn objects to manage.
I made the below change to _DCXBUTT.PRG and it appears to fix the problem:
It means that every time you click a button, 1040 code blocks need to be run and each button needs to be redrawn.
This is a lot of owner-drawn objects to manage.
I made the below change to _DCXBUTT.PRG and it appears to fix the problem:
Code: Select all
METHOD DC_XbpPushButtonXP:WhenHideEval( lEnable, lShow, lProtect, nMode )
IF Valtype(::whenBlock) = 'B' .AND. ::parent:isEnabled()
lEnable := Eval(::whenBlock,self)
IF lEnable
IF !::isEnabled()
::enable()
ENDIF
ELSE
IF ::isEnabled()
::disable()
ENDIF
ENDIF
ENDIF
IF Valtype(::hideBlock) = 'B' .AND. ::parent:isVisible() ;
.AND. IIF(::parent:isDerivedFrom('XbpTabPage'),IIF(::parent:Minimized,.f.,.t. ),.t. )
lShow := !Eval(::hideBlock,self)
IF lShow
::show()
ELSE
::hide()
ENDIF
ENDIF
IF Valtype(::protectBlock) = 'B'
lProtect := Eval(::protectBlock,self)
ENDIF
RETURN self
The eXpress train is coming - and it has more cars.
Re: DCPushButtonXP is slow if I use the Hide option
It's much better now.
Thank you so much.
Thank you so much.
Pedro Alexandre