xulihang Well-Known Member Licensed User Longtime User Jun 5, 2019 #1 I found that the debug mode is very slow when testing the project which I have uploaded at this thread: https://www.b4x.com/android/forum/t...en-many-subs-are-stringed.106328/#post-665791 The result of processing a novel: Debug Mode Code: Copy Waiting for debugger to connect... Program started. A3 Start start time: 10:12:28 end time: 10:13:11 A3 End Release Mode Code: Copy A3 Start start time: 10:35:36 end time: 10:35:42 A3 End
I found that the debug mode is very slow when testing the project which I have uploaded at this thread: https://www.b4x.com/android/forum/t...en-many-subs-are-stringed.106328/#post-665791 The result of processing a novel: Debug Mode Code: Copy Waiting for debugger to connect... Program started. A3 Start start time: 10:12:28 end time: 10:13:11 A3 End Release Mode Code: Copy A3 Start start time: 10:35:36 end time: 10:35:42 A3 End
xulihang Well-Known Member Licensed User Longtime User Jun 5, 2019 #2 Tested again on B4J 7.32. It is faster than the previous test. As this is debug mode, perhaps this result is reasonable. And it is an indication that my code needs optimization. Code: Copy Waiting for debugger to connect... Program started. A3 Start start time: 12:30:10 end time: 12:30:38 A3 End Upvote 0
Tested again on B4J 7.32. It is faster than the previous test. As this is debug mode, perhaps this result is reasonable. And it is an indication that my code needs optimization. Code: Copy Waiting for debugger to connect... Program started. A3 Start start time: 12:30:10 end time: 12:30:38 A3 End
Erel B4X founder Staff member Licensed User Longtime User Jun 5, 2019 #3 There were many improvements to the debugger in the recent versions. Still, you should never test performance in debug mode. The results are meaningless. Upvote 0
There were many improvements to the debugger in the recent versions. Still, you should never test performance in debug mode. The results are meaningless.
MarkusR Well-Known Member Licensed User Longtime User Jun 6, 2019 #4 you should not use Dim inside a loop, it would create a new class object that is mostly unnecessary. simple example: at i 1,2,3 the output of a is empty Code: Copy Sub Test Dim i As Int For i = 0 To 3 Dim a As String If i=0 Then a= "Hallo" Log(i) Log(a) Next End Sub about optimization, count which sub is most used, also check which sub take the most time. Upvote 0
you should not use Dim inside a loop, it would create a new class object that is mostly unnecessary. simple example: at i 1,2,3 the output of a is empty Code: Copy Sub Test Dim i As Int For i = 0 To 3 Dim a As String If i=0 Then a= "Hallo" Log(i) Log(a) Next End Sub about optimization, count which sub is most used, also check which sub take the most time.