Android Question B4A app lagging pretty bad in release mode

Robert Durbin

New Member
Licensed User
Longtime User
A program I made is lagging pretty bad in release mode but works fine in debug mode. The program is quite complicated and it uses several loops and even loops within loops. All ui elements of the app lag even simply clicking on a dropdown list, scrolling is super slow and choppy. Oddly enough everything fixes by itself in about 2-3 minutes of runtime. All objects work and it scroll views work like normal. There does not seem to be in errors programming wise. Debug mode works perfectly the entire time. Its almost like something happening in the background and its slowing everything down. If you leave the app open, the problem does not return. It only happens for the first few minutes. It may or may not be related but I first noticed the problem when I upgraded to 12.50 of B4A. I'm unsure what version I had previously but it was probably around 6 months out of date.
 

Robert Durbin

New Member
Licensed User
Longtime User
Actually figured out the problem. I was loading tons of images in the background while the main app was running. I commented this sub/function out and everything works fine. It was actually old code that I really wasn't using so everything works fine. I still find it odd that it was working just fine in debug mode. I guess debug mode works faster than release mode at least for what my program was doing.

I guess mods/admin can lock this thread or mark it as solved or whatever.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Actually figured out the problem. I was loading tons of images in the background while the main app was running. I commented this sub/function out and everything works fine. It was actually old code that I really wasn't using so everything works fine. I still find it odd that it was working just fine in debug mode. I guess debug mode works faster than release mode at least for what my program was doing.

I guess mods/admin can lock this thread or mark it as solved or whatever.
You can edit the title of the thread as [Solved] by yourself
 
Last edited:
Upvote 0

agraham

Expert
Licensed User
Longtime User
I guess debug mode works faster than release mode at least for what my program was doing.
Debug mode is in fact very much slower than release mode - perhaps because as it was only loading the background images slowly you didn't notice it.
 
Upvote 0
Top