iOS Responsiveness
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
iOS Responsiveness
I am working on an update to an app used to evaluate the skills of nonspeaking persons who use assistive technology for communication. Often time, these individuals will have physical disabilities as well. So, there are options to activate a button on mouseDown, mouseUp or using scanning methods with an external switch. Buttons are grouped with a single group script. Switch scanning is managed in a card script and essentially sends the mouseUp message. If scanning is used, the group should not respond to mouse events. So, I need to screen for mouseUp, mouseDown or switch scanning.
This is the group script. It works pretty well on the desktop, but in the iOS simulator it doesn’t seem to be as responsive. Is there a better way to manage this? Thanks in advance for your help.
---cActivateOnRelease “true” is activate on mouseUp, "false" is activate on mouseDown. Response data is collected to fields "C_VI_XLarge" (correct answer) or "W_VI_XLarge" (wrong answer). cScanType indicates a switch is being used for access.
on mouseUp
If the cActivateOnRelease of this stack is "false" or the cScanType of this stack is not EMPTY then exit mouseUp
put the short name of the target into tButtonSelected
switch tButtonSelected
case "Correct"
add 1 to field "C_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
case "Button"
add 1 to field "W_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
end switch
goNextMkdCd
end mouseUp
on mouseDown
If the cActivateOnRelease of this stack is "true" or the cScanType of this stack is not EMPTY then exit mouseDown
put the short name of the target into tButtonSelected
switch tButtonSelected
case "Correct"
add 1 to field "C_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
case "Button"
add 1 to field "W_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
end switch
goNextMkdCd
end mouseDown
This is the group script. It works pretty well on the desktop, but in the iOS simulator it doesn’t seem to be as responsive. Is there a better way to manage this? Thanks in advance for your help.
---cActivateOnRelease “true” is activate on mouseUp, "false" is activate on mouseDown. Response data is collected to fields "C_VI_XLarge" (correct answer) or "W_VI_XLarge" (wrong answer). cScanType indicates a switch is being used for access.
on mouseUp
If the cActivateOnRelease of this stack is "false" or the cScanType of this stack is not EMPTY then exit mouseUp
put the short name of the target into tButtonSelected
switch tButtonSelected
case "Correct"
add 1 to field "C_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
case "Button"
add 1 to field "W_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
end switch
goNextMkdCd
end mouseUp
on mouseDown
If the cActivateOnRelease of this stack is "true" or the cScanType of this stack is not EMPTY then exit mouseDown
put the short name of the target into tButtonSelected
switch tButtonSelected
case "Correct"
add 1 to field "C_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
case "Button"
add 1 to field "W_VI_XLarge" of card "RawDataCd" of stack "R_dataStack"
break
end switch
goNextMkdCd
end mouseDown
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: iOS Responsiveness
Hi chelling,
It seems we work with the same people
Could you post a simple stack ?
Best regards
Jean-Marc
It seems we work with the same people
Did you try it on iPad ?in the iOS simulator it doesn’t seem to be as responsive
Could you post a simple stack ?
Best regards
Jean-Marc
Last edited by jmburnod on Tue Sep 20, 2016 8:10 am, edited 1 time in total.
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: iOS Responsiveness
Ah, the simulator. All emulators are notorious for not delivering performance on par with native on-device execution, and Apple's is no exception.
They outline some key differences between the simulator and on-device performance here:
https://developer.apple.com/library/con ... lator.html
In addition to the significant overhead of emulating the ARM instruction set under the very different x86, other factors contribute to the performance loss, like this one:
Either way, given the many other limitations imposed by a simulator, Jean-Marc's advice is spot on: nothing will provide as good an assessment of on-device performance as on-device testing.
They outline some key differences between the simulator and on-device performance here:
https://developer.apple.com/library/con ... lator.html
In addition to the significant overhead of emulating the ARM instruction set under the very different x86, other factors contribute to the performance loss, like this one:
I believe LC uses a tile-based renderrer, or at least it used to.Simulator does not use a tile-based deferred renderer.
Either way, given the many other limitations imposed by a simulator, Jean-Marc's advice is spot on: nothing will provide as good an assessment of on-device performance as on-device testing.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: iOS Responsiveness
Thanks Jean-Marc and Richard. This makes me feel much better about the app progress. I haven’t tried it on the iPad yet. I am still working on adding the text to speech. This is a pretty large project. It is an existing app that I am re-writing from the ground up and I feel very responsible to the existing users. I will keep at it.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: iOS Responsiveness
I use sunnytext2Speech, an external developed by Thierry Douez which works fine.I am still working on adding the text to speech
https://alternatic.ch
Re: iOS Responsiveness
Just to correct a misconception here: the iOS simulator does not emulate the ARM instruction set. The iOS simulators are actually x86 / x86-64 programs, and when you deploy your app for the iOS simulator LiveCode generates an x86 or x86-64 program. This has the distinct disadvantage that the app you run in the simulator is a different app to the one you deploy to the device.FourthWorld wrote:In addition to the significant overhead of emulating the ARM instruction set under the very different x86
By contrast, Android apps are almost always simulated by running them in an actual ARM emulator.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: iOS Responsiveness
Good to know, Peter. Thanks. Then what other factors may contribute to the performance loss when running in the simulator?peter-b wrote:Just to correct a misconception here: the iOS simulator does not emulate the ARM instruction set. The iOS simulators are actually x86 / x86-64 programs, and when you deploy your app for the iOS simulator LiveCode generates an x86 or x86-64 program.FourthWorld wrote:In addition to the significant overhead of emulating the ARM instruction set under the very different x86
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn