iOS Responsiveness

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chelling
Posts: 100
Joined: Tue Mar 06, 2007 3:14 am

iOS Responsiveness

Post by chelling » Fri Sep 16, 2016 8:46 pm

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: iOS Responsiveness

Post by jmburnod » Sat Sep 17, 2016 10:10 am

Hi chelling,
It seems we work with the same people
in the iOS simulator it doesn’t seem to be as responsive
Did you try it on iPad ?
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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: iOS Responsiveness

Post by FourthWorld » Sat Sep 17, 2016 4:32 pm

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:
Simulator does not use a tile-based deferred renderer.
I believe LC uses a tile-based renderrer, or at least it used to.

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

chelling
Posts: 100
Joined: Tue Mar 06, 2007 3:14 am

Re: iOS Responsiveness

Post by chelling » Sat Sep 17, 2016 8:14 pm

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.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: iOS Responsiveness

Post by jmburnod » Sat Sep 17, 2016 10:12 pm

I am still working on adding the text to speech
I use sunnytext2Speech, an external developed by Thierry Douez which works fine.
https://alternatic.ch

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: iOS Responsiveness

Post by peter-b » Mon Sep 19, 2016 11:33 am

FourthWorld wrote:In addition to the significant overhead of emulating the ARM instruction set under the very different x86
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.

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: iOS Responsiveness

Post by FourthWorld » Mon Sep 19, 2016 3:18 pm

peter-b wrote:
FourthWorld wrote:In addition to the significant overhead of emulating the ARM instruction set under the very different x86
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.
Good to know, Peter. Thanks. Then what other factors may contribute to the performance loss when running in the simulator?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “iOS Deployment”