Android Question Something VERY wrong with debugger in V10

Status
Not open for further replies.

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Hello all,

this is a sequence of threads in which I'm sharing some problems those I detected in B4A v10... As I have many apps developed in V 9.30 , I could compare and here it's another problem that I found.
Running huge sql asynchronous batches in my app I could notice a big difference in performance when in debug mode. See: follows a sample of log:

B4X:
Debug Mode:
returned 446 lojas - start insert at -> 18:01:44      -> here the code started to add a sql batch job
Started running query batch at  18:02:25                -> here the code finished the insert job - 41 seconds (!!!)
Insert result true at 18:02:27                                    -> exec batch - only 2 seconds!
START populate list at 18:02:27 registros -> 446
FINISH populate list at 18:02:28 registros -> 446

Compiled (with logger bridge active):
returned 446 lojas - start insert at -> 18:04:12   -> same job
Started running query batch at  18:04:13           -> 1 second (!)
sending message to waiting queue (sleep)
Insert result true at 18:04:15                             -> 2 seconds
START populate list at 18:04:15 registros -> 446
FINISH populate list at 18:04:16 registros -> 446

The SAME code that runs in 41 seconds in debug mode spends only 1 second after compiled (the sql insert batch) - I mean, the code inserts asynchronously 446 records in 1 second after compiled, but lasts 41 seconds in debug (!!!) . This is very bad because when programming sometimes we need to run the same code piece many times and spend 41 seconds for each isn't reasonable when you know that the device has resources to run in 1 second.
This is also a signal that something is going wrong in debugger...

Please, does anybody is having similar problems?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Moved to the questions forum as it is most probably not a bug.

There are several execution pipelines in the debugger and when things become slow it means that an intensive computation task is running on the slow execution pipeline.

The solution is to:
1. Clean the project (Ctrl + P).
2. Remove all breakpoints.
 
Upvote 0

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Moved to the questions forum as it is most probably not a bug.

There are several execution pipelines in the debugger and when things become slow it means that an intensive computation task is running on the slow execution pipeline.

The solution is to:
1. Clean the project (Ctrl + P).
2. Remove all breakpoints.
Hello @Erel . It doesn't see to be something related to "intensive computation" because there is a pattern here. See:
- if I clean the project, the routine spends 1 second to run
- If i change anything in the code and run again, the SAME routine spends 41 seconds.

I think that there is no reason for a so big change in computation requirements by the SAME routine only because one line was added to the code. More: doesn't matter where the new code line is added. Even when the routine will not pass on this specific sector of the added line, the lag will occur.

@OliverA noticed this lag in other thread that I started -> https://www.b4x.com/android/forum/threads/bugs-in-b4a-v-10.120249/post-752083

One thing more: I was using B4A 9.3 and the lag doesn't happen. Now, @OliverA tested for 9.80 and the lag doesn't happen with this version also.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
- if I clean the project, the routine spends 1 second to run
- If i change anything in the code and run again, the SAME routine spends 41 seconds.

I think that there is no reason for a so big change in computation requirements by the SAME routine only because one line was added to the code. More: doesn't matter where the new code line is added. Even when the routine will not pass on this specific sector of the added line, the lag will occur.
This is not new. The debugger always behaved like this and it is related to the way the debugger makes code changes without full compilation. I've explained it in one of the many other threads you started: https://www.b4x.com/android/forum/threads/bugs-in-b4a-v-10.120249/post-752083
 
Last edited:
Upvote 0
Status
Not open for further replies.
Top