Lagging Scroller
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Lagging Scroller
Hello everyone, I might be a new face on the forum, but I've been using LiveCode for over a year now, and have successfully published my first app back in September. I've also been silently lurking these forums now and again to glean new information.
I've been working on a sort of version 2 of my current app, re-hauling the interface and trying to make optimization to the code to slim things down and support more device resolutions. I'm running into issues with the native iOS scroller. I have roughly 20 objects inside of the scroller, primarily being graphic rectangles, and a couple of images. In the iOS simulator, the scrolling is smooth, but as soon as I deploy it to my iPhone 4, it becomes extremely slow and laggy. This is odd, because my previous app had a scroller containing over 150 images, and it scrolls very smoothly.
I have all the settings correct, Accelerated rendering set to true, every layer mode is set to scrolling. I am not using any graphic effects on the graphics.
If someone could take a look at it, it would be greatly appreciated. Who knows, maybe I'm just missing something small, another set of eyes is always useful. Just look in the "Score" card script for the scroller handlers. Thanks,
Jarren
I've been working on a sort of version 2 of my current app, re-hauling the interface and trying to make optimization to the code to slim things down and support more device resolutions. I'm running into issues with the native iOS scroller. I have roughly 20 objects inside of the scroller, primarily being graphic rectangles, and a couple of images. In the iOS simulator, the scrolling is smooth, but as soon as I deploy it to my iPhone 4, it becomes extremely slow and laggy. This is odd, because my previous app had a scroller containing over 150 images, and it scrolls very smoothly.
I have all the settings correct, Accelerated rendering set to true, every layer mode is set to scrolling. I am not using any graphic effects on the graphics.
If someone could take a look at it, it would be greatly appreciated. Who knows, maybe I'm just missing something small, another set of eyes is always useful. Just look in the "Score" card script for the scroller handlers. Thanks,
Jarren
Re: Lagging Scroller
Hi Jarren,
LiveCode works in a different way regarding the layer modes.
Only the layer mode of the topmost control is valid.
I mean, the owner of that particular object {group, image, etc.}
whose layer mode is set to "scrolling" must be the card itself.
Try this:
* Set the layer mode of every each control to static.
* Then, set the layer mode of group "ScrollingGroup" to scrolling.
That should do it.
I applied these changes to your stack and it scrolls smoothly in an old iPod Touch
You can check this link, additionally.
It's a very nice looking app, btw, congrats...
Best,
~ Ender Nafi
That's the problem.every layer mode is set to scrolling.
LiveCode works in a different way regarding the layer modes.
Only the layer mode of the topmost control is valid.
I mean, the owner of that particular object {group, image, etc.}
whose layer mode is set to "scrolling" must be the card itself.
Try this:
* Set the layer mode of every each control to static.
* Then, set the layer mode of group "ScrollingGroup" to scrolling.
That should do it.
I applied these changes to your stack and it scrolls smoothly in an old iPod Touch

You can check this link, additionally.
It's a very nice looking app, btw, congrats...
Best,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: Lagging Scroller
Thank you Ender! I had no idea! I was racking my brain trying to figure out what was wrong. I will definitely update it with the changes you suggested.
Thanks for the compliment on the look of the app, my first passion has been graphic design, next to coding.
Jarren
Thanks for the compliment on the look of the app, my first passion has been graphic design, next to coding.
Jarren
Re: Lagging Scroller
Glad that it helped.
I'd like to grab a copy of the final version of your app.
When you publish it, could you post the itunes store link here?
Thanks,
~ Ender Nafi
I'd like to grab a copy of the final version of your app.
When you publish it, could you post the itunes store link here?
Thanks,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: Lagging Scroller
Sure thing, its for a very niche market that would have no use for you specifically, unless of course you were a 9-14 year old boy or girl who competes in First Lego League. (Google it to find out what exactly it is, and you might understand, for some reason I'm not allowed to link outside the forum)endernafi wrote:Glad that it helped.
I'd like to grab a copy of the final version of your app.
When you publish it, could you post the itunes store link here?
Thanks,
~ Ender Nafi
Re: Lagging Scroller
It's about the post count.for some reason I'm not allowed to link outside the forum
Only after a certain amount of post {posts to this forum} one can give outer links.
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: Lagging Scroller
Finally got the time to do it tonight! Thanks a bunch! Scrolls like molten butter! (for a lack of a better way to describe it
)

Re: Lagging Scroller
Hi Jarren,
My app has a series of buttons & fields that are organized in a scrollgroup as well. I understand how to make them scroll, but your reference to 'molten butter' caught my eye.
My form contains perhaps 60 to 70 objects, and although they are set up properly, they don't scroll in a 'zippy' manner, but more like 'molten mollasses'. The scolling is smooth, but lags behind the touch location a bit. Is that what you're seeing in your app as well?
Joel
My app has a series of buttons & fields that are organized in a scrollgroup as well. I understand how to make them scroll, but your reference to 'molten butter' caught my eye.
My form contains perhaps 60 to 70 objects, and although they are set up properly, they don't scroll in a 'zippy' manner, but more like 'molten mollasses'. The scolling is smooth, but lags behind the touch location a bit. Is that what you're seeing in your app as well?
Joel
Re: Lagging Scroller
I have 86 items in my scroller. All of them are either shapes or fields, with the exception of 7 small images. On the iPhone 4 it scrolls very smoothly, and I can whip my finger up and down as fast as possible and the scroller is stuck to the original position I touched at. Not sure whats going on with your scroller then....jstarkman wrote:Hi Jarren,
My app has a series of buttons & fields that are organized in a scrollgroup as well. I understand how to make them scroll, but your reference to 'molten butter' caught my eye.
My form contains perhaps 60 to 70 objects, and although they are set up properly, they don't scroll in a 'zippy' manner, but more like 'molten mollasses'. The scolling is smooth, but lags behind the touch location a bit. Is that what you're seeing in your app as well?
Joel