iOS Question Slow GUI

iCAB

Well-Known Member
Licensed User
Longtime User
Hi All

I am porting an app from B4A to B4I, all GUI elements are created in code. I am not sure why but the app GUI is very slow compared to B4A so far ( we are only talking debug mode at this point ). The response difference is huge.
So far I am only running single modules to test, so there are no other activities running ( and just in case, I am cleaning the project all the time and remove all breakpoints)

I don't think that performance is related to our code. For example, just sliding a slider, I don't see a smooth scroll ( no code in the event being executed ).

I know this doesn't sound right, but could it be related to code size. The reason, I am saying this is the following: when I create a very small project with controls created in code, the gui is fine.

Any ideas?
Thanks in advance
 
Last edited:

iCAB

Well-Known Member
Licensed User
Longtime User
Note that in most cases it is much simpler to create the layout with the designer. This is more important in B4i than in B4A.

I do appreciate what you are saying, but at this point (at least for this app) it is not an option. What I have implemented is working perfect for me on both platforms. I hardly did any code changes and all my screen appear identical.. May be for the next project, I will definitely look into designer.
However I am not sure that it is related to whether the controls are done using the designer or in code as the slowness is not in drawing the controls, but in updating the controls (for example button labels) after the fact .

Test your program in release mode. Is it slow?
I didn't get to this stage. Still learning the tools. I will in about 2 weeks and I will post my findings


2. Clean the project before you run it in debug mode (Ctrl + P). It will make the debugger faster.
In my case, I have to do this every time regardless(or max every other round) otherwise the debugger doesn't work properly. I also have to clear the breakpoints. It is also worth mentioning that after stopping at a breakpoint, sometimes it is close to impossible to continue debugging properly.

But the good thing is that most of the code is very very compatible with B4A, so I can do most of the debugging with B4A mainly.


Thank you
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Note that in most cases it is much simpler to create the layout with the designer. This is more important in B4i than in B4A.
1. Test your program in release mode. Is it slow?

Hi Erel, I am still in the process of porting the app, so it is hard to say how it will behave at the end.
However I was able to test part of the GUI in release mode, and there is a huge difference in performance between release and debug modes.

In release mode (so far) no issues .. looking good.


Thank you
 
Upvote 0
Top