Android Tutorial Introduction to the libGDX library

Introduction to the libGDX library

What is libGDX ?

libGDX is a game engine. As we saw in the first tutorial, a game engine provides a framework to create games and covers all aspects (rendering, animation, input, music, networking, physics, ...) of various kinds of games.

libGDX is considered as one of the best and fastest engine for the Android world. It is free, rich-featured, reliable, and proved its efficiency in a lot of well-known games (Ingress, Zombie Smasher, Apparatus, Monsterama Park, Clash of the Olympians, Bumbledore, etc.)

It’s a layered framework: it goes from low-level classes for OpenGL experts to high-level classes, easy to use by beginners. It includes a scene graph (Scene2D classes), a physics engine (Box2D classes), a particle system, a map renderer, a sprite batcher, an extensive set of mathematics classes… more than 200 classes in total.

For technical reasons, the version for Basic4Android cannot be multi-platform, and by choice, the current release doesn't include the 3D classes (except the ones for the perspective camera and for the decals) and the Daydream class.

libGDX was created in 2010 by Mario Zechner (badlogicgames.com) and is maintained by M. Zechner, Nathan Sweet (esotericsoftware.com) and a community of developers.

Minimum requirements

OpenGL ES 2.0
Android Froyo (API 8)

Hardware acceleration

libGDX does not require that you enable hardware acceleration on your device because it is based on OpenGL, which interacts directly with the GPU.

Debugging

You cannot use the debugger of B4A with libGDX because most of the code of the library runs in a different thread. You have to use the Log() function to debug your game.

The library provides a debug renderer for Box2D (lgBox2DDebugRenderer), a debug renderer for Scene2D (lgScn2DDebugRenderer) and a profiler for OpenGL (lgGLProfiler).

A word about the classes

The main class is LibGDX. All other classes are prefixed by lg.
All Box2D classes are prefixed by lgBox2D. All Scene2D classes are prefixed by lgScn2D. All Map classes are prefixed by lgMap. All Math classes are prefixed by lgMath.

The LibGDX class gives access to five interfaces: Audio (lgAudio), Files (lgFiles), Graphics (lgGraphics), Input (lgInput), and Net (lgNet). You will use the Input interface, for example, to get the input from the accelerometer.

With some classes (e.g. the five interfaces), you cannot create a new instance with Dim. You have to use an instance returned by the library. For example, you cannot write:
B4X:
Dim Graphics As lgGraphics
Graphics = lGdx.Graphics
but you can write:
B4X:
Dim Graphics As lgGraphics = lGdx.Graphics

Some classes cannot be instantiated at all because they are generic classes (e.g. com.badlogic.gdx.scenes.scene2d.utils.Drawable or com.badlogic.gdx.maps.tiled.TiledMapTile). In this case, either you store their instance as an Object or you use a subclass, e.g.:
B4X:
Dim objTile As Object = CurrentLayer.GetCell(X, Y).Tile
Dim staticTile As lgMapStaticTiledMapTile = CurrentLayer.GetCell(X, Y).Tile

OpenGL ES

I explained what OpenGL is in the previous tutorial and I won't discuss it further here because the main advantage to use a game engine like libGDX is to benefit from the abstraction layer above OpenGL. However, if you need (or want) to call directly OpenGL, here's how to get access to the classes and functions:
B4X:
Dim lGdx_GL20 As lgGL20 = lGdx.Graphics.GL20
or better (includes also the constants):
B4X:
Dim GL As lgGL

Note: libGDX uses the 2D coordinate system and the color encoding of OpenGL ES, so the Y-axis is pointing upwards and each color value ranges from 0 to 1.

The libGDX life-cycle

An important thing to keep in mind about libGDX is that it runs in its own thread. Your Basic4Android application runs most of the time in a different thread called the UI thread, or main thread. That means you cannot access the other views of your activity and change their properties from the libGDX thread. Fortunately, there's a function in the LibGDX class that passes the runnable (the piece of code to execute) from a thread to the other: CallSubUI. So if you want to change the activity title, set a label text or show a MsgBox from the libGDX thread, don't forget to use this function to avoid a crash!

Since libGDX runs in a different thread, you have to inform its library of the events of your activity : Create, Pause and Resume. First, create an instance of libGDX in Globals :
B4X:
Dim lGdx As libGDX
In Activity_Create (and nowhere else), add the Initialize function :
B4X:
lGdx.Initialize(False, "LG") 'fills the activity with the libGDX surface, uses OpenGL 1 for compatibility and prefixes the events with LG
In Activity_Resume, add the following line :
B4X:
If lGdx.IsInitialized Then lGdx.Resume
In Activity_Pause, add the following line :
B4X:
If lGdx.IsInitialized Then lGdx.Pause

You could initialize libGDX differently. For example, it could be limited to a view with InitializeView. You could also define a configuration (lgConfiguration class) and pass it to libGDX. Example:
B4X:
Dim Config As lgConfiguration

'Disables the accelerometer and the compass
Config.useAccelerometer = False
Config.useCompass = False

'Uses a WakeLock (the device will stay on)
Config.useWakelock = True

'Creates the libGDX surface
lGdx.Initialize2(Config, "LG")

Once done, your library is ready to raise the events of its life-cycle : Create, Resize, Render, Pause, Resume, Dispose. These events are the place to put all the code of your game. Don't put anything in the usual activity events. They are reserved for your other views and are raised by the UI thread.

Create :

Create is the first raised event. It is raised soon after the initialization of the library and the creation of the OpenGL surface.
In this event, initialize your renderer and your input processors, load your resources (we'll see that in detail later) and initialize your game data.

Resize :

Resize is raised when the size of the libGDX surface changes. Under Android, that should only happen when you start the application and when it is restarted after a rotation or resumed.
It is raised at least once, after Create, and, when the application is resumed, just before Resume.
In this event, initialize the camera viewport. It's probably the only use you will find for it.
This event returns the new width and height in pixels.

Render :

Render is raised as soon as possible after Create and Resize.
It's where things are drawn. It's also where you have to put the logic of your game, but I would not recommend putting hundreds of lines of code here. Instead, create new subs and new modules and call them from this event.
The first lines in Render should be to clear the screen. Example:
B4X:
lGdx_GL.glClearColor(0, 0, 1, 1) 'Blue background
lGdx_GL.glClear(lGdx_GL.GL10_COLOR_BUFFER_BIT)

Pause :

Pause is raised when the activity is sent in the background, rotated or exited.
It's the right place to save your game data.
Note that the OpenGL context is destroyed when the app goes in the background, so all your unmanaged textures and pixmaps have to be reloaded or recreated in the Resume event when the app returns to the foreground.

Resume :

Contrary to the Resume event of your activity, this one is not raised after Create, only when the application returns from a pause.
As the OpenGL context is destroyed when the app goes in the background, all your unmanaged* textures and pixmaps have to be reloaded or recreated when this event is raised. More info here. *Not loaded by an asset manager.

Dispose :

Dispose is called when the activity is exited, after Pause, or when the device is rotated.
In this event, release all the used resources by calling the Dispose function of objects (if they have one).

The life-cycle :
application_lifecycle_diagram.png


Multiple screens

A game is made of many screens. You could create an activity for each one, but that would not be very convenient because you'd have to reinitialize the library in each activity and reload some resources. Moreover, that would not ease any graphical transition between screens. In fact, most games are made with a very small number of activities and make use of a screen manager instead. The screen manager stores the reference of the different screens and allows switching between them. Each screen has its own life-cycle.
To create a screen manager with two screens, for example, declare them in Globals:
B4X:
Dim lGdx_ScrMgr As lgScreenManager
Dim lGdx_Screen(2) As lgScreen
Then add these lines in the Create event handler:
B4X:
'Creates two screens
lGdx_ScrMgr.Initialize(lGdx)
lGdx_Screen(0) = lGdx_ScrMgr.AddScreen("LGS1")
lGdx_Screen(1) = lGdx_ScrMgr.AddScreen("LGS2")
Show the first screen:
B4X:
lGdx_ScrMgr.CurrentScreen = lGdx_Screen(0)

When you want to change the current screen, just change the value of the CurrentScreen property. That will raise the Hide event of the previous screen and the Show event of the new one.

The screens have the same life-cycle as the library, and thus the same events except that Create is named Show and Dispose is named Hide.

Input processor and gesture detector

To get the input events raised by your players, you have to declare input processors. libGDX has an input processor for keyboard and touch events (lgInputProcessor) and a specialized input processor for gestures (lgGestureDetector).
Start by declaring them in Globals:
B4X:
Dim lGdx_IP As lgInputProcessor
Dim lGdx_GD As lgGestureDetector
Initialize them in the Create event (or the Show event of a screen if you want different processors for different screens):
B4X:
lGdx_IP.Initialize("IP")
lGdx_GD.Initialize("GD")
And add the event handlers that you need:
B4X:
Sub IP_KeyDown(KeyCode As Int) As Boolean
   Return False
End Sub

Sub IP_KeyUp(KeyCode As Int) As Boolean
   Return False
End Sub

Sub IP_KeyTyped(Character As Char) As Boolean
   Return False
End Sub

Sub IP_TouchDown(ScreenX As Int, ScreenY As Int, Pointer As Int) As Boolean
   Return False
End Sub

Sub IP_TouchDragged(ScreenX As Int, ScreenY As Int, Pointer As Int) As Boolean
   Return False
End Sub

Sub IP_TouchUp(ScreenX As Int, ScreenY As Int, Pointer As Int) As Boolean
   Return False
End Sub

Sub GD_TouchDown(X As Float, Y As Float, Pointer As Int) As Boolean
   Return False
End Sub

Sub GD_Fling(VelocityX As Float, VelocityY As Float) As Boolean
   Return False
End Sub

Sub GD_LongPress(X As Float, Y As Float) As Boolean
   Return False
End Sub

Sub GD_Pan(X As Float, Y As Float, DeltaX As Float, DeltaY As Float) As Boolean
   Return False
End Sub

Sub GD_Pinch(InitialPointer1 As lgMathVector2, InitialPointer2 As lgMathVector2, Pointer1 As lgMathVector2, Pointer2 As lgMathVector2) As Boolean
   Return False
End Sub

Sub GD_Tap(X As Float, Y As Float, Count As Int) As Boolean
   Return False
End Sub

Sub GD_Zoom(InitialDistance As Float, Distance As Float) As Boolean
    Return False
End Sub

Description of events :

Fling: The user quickly dragged a finger across the screen, then lifted it. Useful to implement swipe gestures.
Pan: The user is dragging a finger across the screen. The detector reports the current touch coordinates as well as the delta between the current and previous touch positions. Useful to implement camera panning in 2D.
Pinch: Similar to zoom. The detector reports the initial and current finger positions instead of the distance. Useful to implement camera zooming and more sophisticated gestures such as rotation.
Tap: The user touched the screen and lifted the finger. The finger must not move outside a specified square area around the initial touch position for a tap to be registered. Multiple consecutive taps will be detected if the user performs taps within a specified time interval.
Zoom: The user has placed two fingers on the screen and is moving them together/apart. The detector reports both the initial and current distance between fingers in pixels. Useful to implement camera zooming.

The other events are self-explanatory.

.....
 
Last edited:

ilan

Expert
Licensed User
Longtime User
If the actor is an image or a button, why do you draw it in this event?

according to this explenation i have to do it like this:

gamestage2.jpg


if i dont draw it in the gamebtn event then how will the lgtexture of the actor be drawn?
its not like a android button or imageview where i attach to it a bitmap like imageview1.bitmap = bmp
an actor need to be drawn each frame and the lgScn2DStage .draw command will call that event to draw it correct?

this is what the lgScn2DStage.draw command does it call the draw event and i have to do it on each frame in the LG_Render sub.
 

ilan

Expert
Licensed User
Longtime User
btw my actors are not buttons or img

B4X:
Private playbtn(6) As lgScn2DActor

should i use a lgScn2DImage instead?
 

ilan

Expert
Licensed User
Longtime User
lgScn2DStage.draw draws all actors. You don't need to draw them yourself, except if you don't want the default drawing (in this case and only in this case, you create the sub for the draw event).

ok but how do i set an image to an actor? sorry i still have not understood this,
i thought the lgScn2DStage.draw calls the draw event and in this event i draw for each actor an texture.

if i dont do it like this then where do i set the actor image? in lgcreate? and how?

thank you for your help :)
 

Informatix

Expert
Licensed User
Longtime User
ok but how do i set an image to an actor? sorry i still have not understood this,
i thought the lgScn2DStage.draw calls the draw event and in this event i draw for each actor an texture.

if i dont do it like this then where do i set the actor image? in lgcreate? and how?

thank you for your help :)
With Initialize of lgScn2dImage...
Please look at my examples.
 

ilan

Expert
Licensed User
Longtime User
Please look at my examples.

i have, without them i would not be able to turn on my PC :p
(so thanx a lot for your examples)

With Initialize of lgScn2dImage...

yes thats true with the lgScn2dImage i can do it when i intialize it, with "InitializeWithDrawable" but an lgScn2DActor does not have such a command
and according to your Scene2D_Buttons example you are doing the same:

you have an lgscn2dactor called Animimg

B4X:
Dim AnimImg As lgScn2DActor

and you add to a lgscn2dbutton this actor and this actor will be drawn each frame with Stage.draw

B4X:
Sub LG_Render
    'Clears the screen
    GL.glClear(GL.GL10_COLOR_BUFFER_BIT)

    'Applies the actions to actors
    Stage.Act

    'Draws the buttons
    Stage.Draw
End Sub

this is the draw event of the actor:

B4X:
Sub AnimImg_Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
    'Animates the alien when the checked state of the button is True
    Dim Actor As lgScn2DActor = Sender
    Dim Frame As lgTextureRegion
    If Buttons(0).Checked Then
        'Dynamic
        Frame = Animation.GetKeyFrame2(Actor.Tag, True)
        Actor.Tag = Actor.Tag + lGdx.Graphics.DeltaTime 'State time
    Else
        'Static
        Frame = Animation.GetKeyFrame(0)
        Actor.Tag = 0
    End If
    SpriteBatch.DrawRegion3(Frame, Actor.X, Actor.Y, Actor.OriginX, Actor.OriginY, Actor.Width, Actor.Height, Actor.ScaleX, Actor.ScaleY, Actor.Rotation)
End Sub
 

ilan

Expert
Licensed User
Longtime User
From the documentation above:

the problem is that i change the image alpha when i click on the button and i would like to have control on it and not draw it with the same lgtexture always.
so this is the reason i use lgScn2DActor.
 

Informatix

Expert
Licensed User
Longtime User
i have, without them i would not be able to turn on my PC :p
(so thanx a lot for your examples)



yes thats true with the lgScn2dImage i can do it when i intialize it, with "InitializeWithDrawable" but an lgScn2DActor does not have such a command
and according to your Scene2D_Buttons example you are doing the same:

you have an lgscn2dactor called Animimg

B4X:
Dim AnimImg As lgScn2DActor

and you add to a lgscn2dbutton this actor and this actor will be drawn each frame with Stage.draw

B4X:
Sub LG_Render
    'Clears the screen
    GL.glClear(GL.GL10_COLOR_BUFFER_BIT)

    'Applies the actions to actors
    Stage.Act

    'Draws the buttons
    Stage.Draw
End Sub

this is the draw event of the actor:

B4X:
Sub AnimImg_Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
    'Animates the alien when the checked state of the button is True
    Dim Actor As lgScn2DActor = Sender
    Dim Frame As lgTextureRegion
    If Buttons(0).Checked Then
        'Dynamic
        Frame = Animation.GetKeyFrame2(Actor.Tag, True)
        Actor.Tag = Actor.Tag + lGdx.Graphics.DeltaTime 'State time
    Else
        'Static
        Frame = Animation.GetKeyFrame(0)
        Actor.Tag = 0
    End If
    SpriteBatch.DrawRegion3(Frame, Actor.X, Actor.Y, Actor.OriginX, Actor.OriginY, Actor.Width, Actor.Height, Actor.ScaleX, Actor.ScaleY, Actor.Rotation)
End Sub
Yes, you can do animations this way but you can also change the Drawable property of the image before calling Stage.Draw. It works fine when all frames have the same size and offers a performance advantage: you don't raise multiple events. But for animations, I agree, I use the Draw event because I want usually to have a full control over all aspects of my rendering. And about performance, I draw hundreds of actors in Diktatour at 60fps so it's not a major drawback.
Concerning your issue, you should time almost everything run in your Draw events. It's the only way to know where's the bottleneck.
 

ilan

Expert
Licensed User
Longtime User
thank you for your help

if you are interested i have made a simple example that demonstrate the issue i have.

if you draw the stage with the stage.draw command after a while about 30sec the time between each frame will go up.
using a separate sub and comment stage.draw will give you much less time per frame.

(tested on galaxy S5)

Note that you need to wait a while (>30sec) to noticed the frame drop when you use Stage.draw
 

Attachments

  • StageExample.zip
    268.4 KB · Views: 303

Informatix

Expert
Licensed User
Longtime User
thank you for your help

if you are interested i have made a simple example that demonstrate the issue i have.

if you draw the stage with the stage.draw command after a while about 30sec the time between each frame will go up.
using a separate sub and comment stage.draw will give you much less time per frame.

(tested on galaxy S5)

Note that you need to wait a while (>30sec) to noticed the frame drop when you use Stage.draw
After running your test 5min, I did not see a major change in the drawing time. The Draw sub is faster than the draw event of Stage and its rendering time fluctuates a lot less but I explained why (event!) and there's no surprise here. I tested with B4A v6.31 and v5.80.
After that I made three changes to your demo:
1) To avoid creating a useless TextureRegion object:
B4X:
Dim Frame As lgTextureRegion = Animation.GetKeyFrame2(Actor.Tag, True)
2) To get the FPS every second:
B4X:
If nt.NanoTime - starttime > 1000000000 Then
        Log("STAGE=" & lGdx.Graphics.FramesPerSecond)
        starttime = nt.NanoTime
End If
3) To increase the number of actors to 200.
The code is attached to this post.
I got regularly 61 fps even after a few minutes with B4A v5.80 and v6.31 so I cannot explain what you get on your device. What's the result with my changes?
 

Attachments

  • Scene2D_Buttons.zip
    1.9 KB · Views: 289

ilan

Expert
Licensed User
Longtime User
ok when i run the example i am getting 60 fps but this is only 1 task. in a game with lot of stuff and box2d physic calculation and drawing tilemap from tiled it will have a big influence since the stage.draw alone takes in your example about 8ms (after few seconds)

you can see in the logs that the time the stage.draw takes changes after a while (Galaxy S5 android 6.0.1)

STAGE=61
STAGE=60
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=60
STAGE=61
STAGE=60
STAGE=61
STAGE=61
STAGE=61
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor listener setup
OGL renderer: Adreno (TM) 330
OGL vendor: Qualcomm
OGL version: OpenGL ES 3.0 [email protected] AU@ (GIT@Ia10634f51b)
OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
framebuffer: (5, 6, 5, 0)
depthbuffer: (16)
stencilbuffer: (0)
samples: (0)
coverage sampling: (false)
Managed meshes/app: { }
Managed textures/app: { }
Managed shaders/app: { }
Managed buffers/app: { }
DRAW=5.970
DRAW=4.737
DRAW=3.124
DRAW=2.818
DRAW=2.933
DRAW=3.249
DRAW=2.873
DRAW=2.614
DRAW=3.084
DRAW=3.028
DRAW=2.895
DRAW=3.058
DRAW=2.933
DRAW=2.696
DRAW=2.987
DRAW=2.675
DRAW=2.582
DRAW=4.861
DRAW=2.832
DRAW=3.819
DRAW=3.991
DRAW=2.824
DRAW=2.754
DRAW=3.919
DRAW=3.339
DRAW=3.220
DRAW=3.572
DRAW=2.850
DRAW=3.024
DRAW=2.662
DRAW=3.552
DRAW=4.132
DRAW=3.006
DRAW=3.002
DRAW=2.996
DRAW=2.752
DRAW=3.608
DRAW=7.144
DRAW=2.775
DRAW=3.294
DRAW=3.207
DRAW=4.174
DRAW=3.021
DRAW=2.884
DRAW=2.762
DRAW=2.845
DRAW=3.426
DRAW=2.599
DRAW=5.298
DRAW=2.763
DRAW=2.859
DRAW=2.566
DRAW=2.837
DRAW=2.724
DRAW=2.774
DRAW=2.794
DRAW=2.667
DRAW=3.033
DRAW=2.707
DRAW=2.624
DRAW=2.937
DRAW=2.678
DRAW=2.852
DRAW=2.869
DRAW=2.650
DRAW=3.396
DRAW=2.897
DRAW=2.888
DRAW=2.748
DRAW=2.818
DRAW=3.048
DRAW=3.000
DRAW=2.632
DRAW=3.577
DRAW=3.285
DRAW=3.887
DRAW=2.757
DRAW=5.601
DRAW=11.003
DRAW=5.344
DRAW=3.808
DRAW=2.988
DRAW=2.853
DRAW=3.910
DRAW=6.354
DRAW=2.999
DRAW=2.909
DRAW=3.056
DRAW=2.997
DRAW=3.703
DRAW=2.982
DRAW=2.970
DRAW=2.730
DRAW=2.680
DRAW=2.786
DRAW=3.268
DRAW=2.849
DRAW=2.875
DRAW=3.444
DRAW=2.740
DRAW=2.713
DRAW=2.860
DRAW=2.659
DRAW=2.659
DRAW=2.977
DRAW=2.665
DRAW=2.696
DRAW=5.349
DRAW=2.568
DRAW=2.771
DRAW=5.586
DRAW=3.210
DRAW=2.772
DRAW=2.819
DRAW=3.187
DRAW=2.711
DRAW=8.679
DRAW=2.712
DRAW=2.682
DRAW=2.735
DRAW=2.673
DRAW=2.573
DRAW=5.193
DRAW=5.141
DRAW=2.847
DRAW=3.359
DRAW=2.675
DRAW=2.936
DRAW=3.385
DRAW=3.526
DRAW=2.705
DRAW=3.265
DRAW=2.957
DRAW=2.760
DRAW=2.684
DRAW=2.978
DRAW=2.604
DRAW=2.933
DRAW=3.404
DRAW=2.670
DRAW=2.826
DRAW=3.063
DRAW=2.652
DRAW=3.144
DRAW=6.146
DRAW=2.595
DRAW=3.354
DRAW=2.613
DRAW=3.083
DRAW=3.869
DRAW=5.392
DRAW=4.921
DRAW=4.662
DRAW=2.843
DRAW=3.412
DRAW=3.004
DRAW=2.999
DRAW=3.030
DRAW=2.933
DRAW=2.802
DRAW=2.740
DRAW=2.993
DRAW=2.807
DRAW=2.768
DRAW=3.219
DRAW=3.081
DRAW=4.612
DRAW=3.599
DRAW=2.774
DRAW=2.625
DRAW=2.684
DRAW=2.589
DRAW=2.610
DRAW=2.612
DRAW=2.590
DRAW=2.594
DRAW=2.671
DRAW=2.585
DRAW=2.799
DRAW=2.656
DRAW=4.189
DRAW=3.081
DRAW=2.923
DRAW=2.710
DRAW=2.745
DRAW=2.972
DRAW=4.063
DRAW=2.830
DRAW=3.253
DRAW=3.047
DRAW=2.674
DRAW=2.783
DRAW=3.289
DRAW=2.797
DRAW=2.834
DRAW=2.820
DRAW=2.655
DRAW=2.823
DRAW=2.827
DRAW=2.713
DRAW=6.016
DRAW=3.160
DRAW=3.098
DRAW=2.957
DRAW=2.946
DRAW=6.211
DRAW=2.620
DRAW=2.695
DRAW=2.889
DRAW=3.023
DRAW=2.595
DRAW=2.588
DRAW=2.734
DRAW=3.628
DRAW=2.678
DRAW=2.669
DRAW=2.737
DRAW=2.710
DRAW=4.392
DRAW=2.991
DRAW=4.162
DRAW=2.631
DRAW=2.529
DRAW=2.772
DRAW=4.411
DRAW=2.578
DRAW=2.729
DRAW=2.869
DRAW=3.056
DRAW=2.878
DRAW=2.677
DRAW=2.638
DRAW=2.701
DRAW=2.742
DRAW=2.702
DRAW=2.774
DRAW=2.731
DRAW=2.780
DRAW=3.176
DRAW=2.997
DRAW=4.183
DRAW=2.736
DRAW=2.695
DRAW=2.576
DRAW=2.603
DRAW=2.725
DRAW=3.058
DRAW=5.708
DRAW=3.080
DRAW=4.485
DRAW=3.964
DRAW=3.499
DRAW=3.475
DRAW=3.031
DRAW=3.091
DRAW=3.138
DRAW=3.164
DRAW=2.961
DRAW=3.069
DRAW=5.843
DRAW=4.496
DRAW=2.800
DRAW=2.853
DRAW=2.881
DRAW=3.392
DRAW=3.445
DRAW=3.452
DRAW=3.138
DRAW=2.990
DRAW=2.916
DRAW=2.747
DRAW=3.294
DRAW=4.193
DRAW=8.336
DRAW=3.357
DRAW=2.703
DRAW=2.843
DRAW=3.831
DRAW=2.889
DRAW=2.826
DRAW=2.970
DRAW=3.042
DRAW=2.949
DRAW=3.247
DRAW=2.678
DRAW=2.736
DRAW=2.996
DRAW=2.854
DRAW=3.153
DRAW=2.714
DRAW=2.853
DRAW=2.679
DRAW=3.019
DRAW=2.858
DRAW=3.076
DRAW=2.895
DRAW=3.164
DRAW=3.764
DRAW=2.940
DRAW=3.167
DRAW=3.604
DRAW=3.377
DRAW=3.372
DRAW=3.465
DRAW=3.217
DRAW=3.240
DRAW=3.645
DRAW=3.128
DRAW=3.253
DRAW=3.176
DRAW=3.219
DRAW=3.029
DRAW=3.588
DRAW=2.703
DRAW=2.954
DRAW=3.258
DRAW=2.994
DRAW=3.222
DRAW=3.275
DRAW=4.398
DRAW=3.028
DRAW=2.843
DRAW=3.154
DRAW=2.826
DRAW=3.533
DRAW=3.305
DRAW=3.063
DRAW=9.486
DRAW=3.787
DRAW=3.037
DRAW=3.986
DRAW=2.900
DRAW=3.058
DRAW=2.951
DRAW=3.435
DRAW=2.802
DRAW=3.139
DRAW=3.218
DRAW=3.537
DRAW=2.962
DRAW=3.072
DRAW=3.123
DRAW=3.491
DRAW=2.968
DRAW=3.539
DRAW=3.189
DRAW=2.803
DRAW=2.779
DRAW=3.257
DRAW=3.812
DRAW=3.107
DRAW=3.048
DRAW=2.780
DRAW=36.961
DRAW=2.879
DRAW=3.508
DRAW=3.082
DRAW=2.624
DRAW=2.756
DRAW=2.946
DRAW=2.892
DRAW=2.767
DRAW=2.660
DRAW=3.631
DRAW=3.913
DRAW=2.995
DRAW=3.265
DRAW=2.515
DRAW=2.827
DRAW=2.733
DRAW=2.896
DRAW=2.651
DRAW=5.556
DRAW=3.429
DRAW=8.713
DRAW=3.319
DRAW=2.917
DRAW=2.818
DRAW=3.727
DRAW=2.674
DRAW=2.578
DRAW=3.373
DRAW=3.321
DRAW=3.661
DRAW=3.391
DRAW=3.212
DRAW=3.568
DRAW=2.811
DRAW=3.401
DRAW=2.834
DRAW=2.871
DRAW=3.191
DRAW=2.933
DRAW=3.103
DRAW=2.989
DRAW=2.664
DRAW=3.104
DRAW=3.304
DRAW=3.548
DRAW=3.055
DRAW=3.213
DRAW=2.673
DRAW=3.040
DRAW=2.627
DRAW=2.609
DRAW=2.715
DRAW=2.890
DRAW=2.641
DRAW=3.047
DRAW=4.304
DRAW=2.580
DRAW=3.179
DRAW=2.606
DRAW=2.769
DRAW=3.565
DRAW=2.666
DRAW=2.688
DRAW=2.654
DRAW=2.766
DRAW=2.969
DRAW=2.633
DRAW=2.570
DRAW=2.609
DRAW=3.399
DRAW=2.846
DRAW=2.690
DRAW=3.804
DRAW=2.678
DRAW=2.948
DRAW=2.760
DRAW=2.777
DRAW=8.581
DRAW=5.073
DRAW=3.307
DRAW=2.519
DRAW=3.146
DRAW=3.396
DRAW=2.593
DRAW=3.346
DRAW=2.910
DRAW=3.928
DRAW=2.890
DRAW=3.005
DRAW=2.901
DRAW=3.632
DRAW=3.396
DRAW=2.791
DRAW=2.960
DRAW=3.144
DRAW=3.362
DRAW=3.417
DRAW=2.811
DRAW=3.005
DRAW=2.920
DRAW=2.656
DRAW=2.838
DRAW=2.856
DRAW=3.342
DRAW=3.030
DRAW=2.878
DRAW=2.886
DRAW=7.335
DRAW=3.663
DRAW=3.071
DRAW=4.068
DRAW=3.121
DRAW=4.208
DRAW=4.675
DRAW=3.472
DRAW=2.826
DRAW=2.698
DRAW=3.025
DRAW=4.438
DRAW=3.780
DRAW=2.854
DRAW=4.492
DRAW=2.932
DRAW=2.709
DRAW=2.852
DRAW=3.024
DRAW=2.851
DRAW=2.754
DRAW=2.986
DRAW=2.750
DRAW=2.754
DRAW=2.888
DRAW=2.743
DRAW=2.775
DRAW=2.709
DRAW=2.626
DRAW=2.640
DRAW=2.668
DRAW=2.671
DRAW=2.590
DRAW=3.024
DRAW=3.357
DRAW=3.421
DRAW=2.783
DRAW=2.609
DRAW=2.774
DRAW=2.855
DRAW=3.244
DRAW=3.068
DRAW=2.680
DRAW=2.846
DRAW=2.646
DRAW=2.895
DRAW=2.616
DRAW=2.726
DRAW=2.795
DRAW=2.637
DRAW=2.651
DRAW=2.754
DRAW=2.774
DRAW=2.659
DRAW=9.271
DRAW=2.913
DRAW=2.874
DRAW=2.782
DRAW=3.318
DRAW=3.262
DRAW=2.825
DRAW=2.772
DRAW=2.980
DRAW=2.883
DRAW=3.235
DRAW=3.354
DRAW=3.224
DRAW=2.759
DRAW=2.651
DRAW=2.541
DRAW=2.527
DRAW=2.517
DRAW=2.564
DRAW=2.794
DRAW=3.454
DRAW=2.819
DRAW=2.747
DRAW=2.689
DRAW=3.425
DRAW=2.552
DRAW=2.561
DRAW=2.519
DRAW=3.549
DRAW=3.017
DRAW=2.561
DRAW=2.559
DRAW=3.760
DRAW=3.097
DRAW=3.068
DRAW=3.033
DRAW=3.092
DRAW=2.604
DRAW=3.845
DRAW=3.452
DRAW=2.895
DRAW=2.644
DRAW=2.676
DRAW=2.628
DRAW=3.363
DRAW=2.607
DRAW=2.607
DRAW=2.891
DRAW=2.948
DRAW=2.583
DRAW=3.056
DRAW=2.508
DRAW=2.582
DRAW=2.512
DRAW=2.526
DRAW=3.719
DRAW=3.446
DRAW=2.563
DRAW=2.544
DRAW=2.534
DRAW=2.524
DRAW=2.543
DRAW=2.540
DRAW=2.546
DRAW=3.687
DRAW=3.460
DRAW=3.280
DRAW=3.213
DRAW=4.072
DRAW=3.179
DRAW=2.569
DRAW=2.534
DRAW=2.632
DRAW=3.275
DRAW=4.741
DRAW=3.774
DRAW=3.772
DRAW=3.695
DRAW=3.783
DRAW=3.778
DRAW=2.656
DRAW=5.330
DRAW=3.735
DRAW=3.760
DRAW=3.788
DRAW=4.604
DRAW=4.594
DRAW=9.446
DRAW=9.708
DRAW=11.278
DRAW=5.551
DRAW=4.583
DRAW=4.670
DRAW=5.725
DRAW=6.139
DRAW=9.095
DRAW=6.162
DRAW=4.926
DRAW=4.792
DRAW=3.402
DRAW=3.617
DRAW=7.404
DRAW=6.238
DRAW=5.257
DRAW=5.307
DRAW=5.995
DRAW=5.305
DRAW=5.514
DRAW=5.580
DRAW=5.683
DRAW=4.698
DRAW=5.362
DRAW=4.486
DRAW=5.798
DRAW=7.303
DRAW=7.000
DRAW=7.686
DRAW=7.607
DRAW=7.823
DRAW=12.443
DRAW=6.014
DRAW=5.167
DRAW=4.038
DRAW=4.863
DRAW=6.292
DRAW=5.022
DRAW=4.756
DRAW=4.707
DRAW=5.949
DRAW=10.370
DRAW=4.930
DRAW=4.894
DRAW=4.409
DRAW=5.388
DRAW=5.969
DRAW=3.869
DRAW=10.415
DRAW=12.372
DRAW=5.636
DRAW=4.666
DRAW=4.402
DRAW=4.918
DRAW=3.438
DRAW=3.517
DRAW=3.385
DRAW=4.707
DRAW=8.703
DRAW=10.044
DRAW=9.349
DRAW=5.384
DRAW=8.989
DRAW=6.013
DRAW=4.703
DRAW=4.950
DRAW=4.889
DRAW=7.042
DRAW=7.206
DRAW=8.123
DRAW=13.380
DRAW=5.269
DRAW=4.566
DRAW=5.703
DRAW=5.289
DRAW=5.342
DRAW=5.559
DRAW=6.496
DRAW=3.350
DRAW=3.375
DRAW=3.405
DRAW=3.316
DRAW=4.239
DRAW=3.750
DRAW=4.048
DRAW=5.967
DRAW=5.908
DRAW=8.383
DRAW=2.851
DRAW=2.671
DRAW=4.806
DRAW=6.881
DRAW=4.269
DRAW=2.749
DRAW=2.714
DRAW=2.686
DRAW=2.916
DRAW=2.636
DRAW=2.653
DRAW=2.793
DRAW=14.742
DRAW=5.293
DRAW=4.804
DRAW=5.183
DRAW=4.652
DRAW=6.198
DRAW=8.136
DRAW=8.991
DRAW=8.494
DRAW=7.225
DRAW=7.128
DRAW=7.935
DRAW=6.729
DRAW=5.475
DRAW=4.689
DRAW=5.009
DRAW=4.611
DRAW=5.931
DRAW=7.139
DRAW=9.541
DRAW=10.703
DRAW=7.765
DRAW=7.267
DRAW=7.239
DRAW=7.167
DRAW=9.034
DRAW=7.914
DRAW=7.213
DRAW=7.613
DRAW=6.505
DRAW=5.718
DRAW=5.375
DRAW=4.998
DRAW=4.993
DRAW=4.645
DRAW=5.163
DRAW=4.433
DRAW=4.064
DRAW=5.087
DRAW=5.144
DRAW=5.102
DRAW=5.390
DRAW=7.013
DRAW=6.438
DRAW=6.533
DRAW=3.951
DRAW=3.917
DRAW=7.246
DRAW=4.765
DRAW=5.639
DRAW=4.697
DRAW=5.732
DRAW=4.225
DRAW=5.623
DRAW=4.907
DRAW=4.927
DRAW=4.231
DRAW=3.948
DRAW=3.938
DRAW=9.705
DRAW=9.649
DRAW=10.631
DRAW=5.089
DRAW=7.347
DRAW=5.065
DRAW=4.645
DRAW=7.197
DRAW=9.322
DRAW=6.247
DRAW=5.416
DRAW=4.383
DRAW=4.045
DRAW=3.557
DRAW=3.884
DRAW=7.362
DRAW=4.647
DRAW=6.039
DRAW=5.091
DRAW=4.711
DRAW=5.160
DRAW=4.749
DRAW=7.169
DRAW=5.313
DRAW=5.256
DRAW=4.254
DRAW=5.629
DRAW=4.723
DRAW=3.479
DRAW=12.710
DRAW=4.994
DRAW=4.599
DRAW=5.153
DRAW=5.038
DRAW=4.641
DRAW=4.677
DRAW=5.199
DRAW=7.867
DRAW=8.758
DRAW=8.418
DRAW=7.201
DRAW=7.219
DRAW=7.586
DRAW=11.247
DRAW=6.114
DRAW=6.289
DRAW=4.708
DRAW=4.024
DRAW=3.539
DRAW=3.473
DRAW=9.318
DRAW=5.495
DRAW=4.714
DRAW=4.716
DRAW=5.507
DRAW=4.645
DRAW=6.456
DRAW=5.502
DRAW=4.630
DRAW=4.732
DRAW=5.414
DRAW=4.644
DRAW=5.028
DRAW=5.443
DRAW=4.684
DRAW=4.765
DRAW=9.478
DRAW=9.397
DRAW=8.258
DRAW=9.148
DRAW=8.664
DRAW=5.592
DRAW=6.054
DRAW=5.416
DRAW=5.943
DRAW=6.441
DRAW=5.392
DRAW=7.117
DRAW=7.852
DRAW=7.163
DRAW=7.869
DRAW=8.221
DRAW=7.964
DRAW=7.083
DRAW=7.167
DRAW=7.125
DRAW=8.137
DRAW=8.252
DRAW=9.975
DRAW=7.051
DRAW=7.335
DRAW=7.185
DRAW=8.165
DRAW=8.066
DRAW=7.246
DRAW=7.158
DRAW=7.226
DRAW=7.184
DRAW=7.032
DRAW=8.249
DRAW=10.333
DRAW=7.085
DRAW=5.474
DRAW=5.425
DRAW=6.116
DRAW=7.703
DRAW=9.134
DRAW=5.433
DRAW=5.168
DRAW=5.089
DRAW=5.989
DRAW=10.250
DRAW=14.946
DRAW=7.326
DRAW=5.102
DRAW=4.573
DRAW=5.083
DRAW=5.506
DRAW=4.659
DRAW=5.504
DRAW=5.082
DRAW=6.527
DRAW=6.063
DRAW=5.404
DRAW=4.708
DRAW=4.928
DRAW=5.195
DRAW=4.725
DRAW=5.818
DRAW=11.028
DRAW=10.174
DRAW=10.441
DRAW=5.303
DRAW=4.610
DRAW=5.477
DRAW=4.849
DRAW=4.973
DRAW=6.829
DRAW=8.735
DRAW=8.213
DRAW=7.098
DRAW=7.575
DRAW=5.438
DRAW=5.984
DRAW=5.783
DRAW=5.424
DRAW=8.081
DRAW=10.256
DRAW=8.136
DRAW=7.776
DRAW=7.798
DRAW=7.800
DRAW=7.814
DRAW=8.461
DRAW=8.230
DRAW=7.742
DRAW=7.918
DRAW=8.309
DRAW=7.135
DRAW=8.407
DRAW=7.774
DRAW=7.211
DRAW=7.892
DRAW=8.476
DRAW=8.556
DRAW=9.703
DRAW=8.738
DRAW=5.545
DRAW=5.753
DRAW=5.436
DRAW=5.480
DRAW=8.568
DRAW=10.694
DRAW=10.471
DRAW=7.222
DRAW=7.207
DRAW=7.782
DRAW=9.046
DRAW=9.411
DRAW=6.311
DRAW=5.403
DRAW=5.695
DRAW=5.392
DRAW=6.703
DRAW=7.236
DRAW=6.805
DRAW=5.497
DRAW=7.956
DRAW=8.198
DRAW=12.781
DRAW=9.482
DRAW=9.811
DRAW=7.937
DRAW=7.699
DRAW=7.984
DRAW=10.067
DRAW=8.895
DRAW=6.398
DRAW=5.767
DRAW=5.468
DRAW=7.190
DRAW=7.248
DRAW=6.672
DRAW=5.754
DRAW=5.475
DRAW=5.663
DRAW=8.057
DRAW=9.519
DRAW=7.945
DRAW=7.242
DRAW=7.667
DRAW=7.092
DRAW=7.365
DRAW=8.537
DRAW=8.044
DRAW=7.195
DRAW=7.683
DRAW=5.695
DRAW=5.593
DRAW=5.362
DRAW=5.598
DRAW=6.388
DRAW=7.455
DRAW=5.419
DRAW=5.243
DRAW=6.539
DRAW=3.739
DRAW=3.422
DRAW=3.476
DRAW=4.685
DRAW=4.711
DRAW=4.813
DRAW=8.567
DRAW=9.579
DRAW=9.315
DRAW=9.188
DRAW=9.252
DRAW=5.608
DRAW=4.742
DRAW=4.772
DRAW=4.598
DRAW=4.974
DRAW=4.684
DRAW=5.852
DRAW=11.640
DRAW=15.863
DRAW=6.278
DRAW=4.722
DRAW=3.934
DRAW=3.882
DRAW=3.557
DRAW=3.548
DRAW=3.547
DRAW=3.585
DRAW=8.088
DRAW=10.029
DRAW=8.817
DRAW=8.027
DRAW=5.308
DRAW=7.189
DRAW=5.404
DRAW=6.529
DRAW=6.852
DRAW=9.507
DRAW=8.163
DRAW=7.498
DRAW=7.106
DRAW=9.044
DRAW=8.556
DRAW=7.391
DRAW=6.968
DRAW=7.912
DRAW=5.400
DRAW=6.492
DRAW=5.379
DRAW=7.640
DRAW=5.306
DRAW=5.579
DRAW=5.376
DRAW=6.493
DRAW=6.903
DRAW=5.308
DRAW=6.208
DRAW=6.063
DRAW=5.413
DRAW=6.913
DRAW=9.441
DRAW=15.098
DRAW=11.997
DRAW=6.877
DRAW=7.030
DRAW=6.890
DRAW=7.147
DRAW=8.894
DRAW=7.072
DRAW=5.275
DRAW=4.902
DRAW=6.259
DRAW=8.683
DRAW=10.586
DRAW=8.984
DRAW=9.514
DRAW=7.332
DRAW=8.118
DRAW=7.388
DRAW=7.004
DRAW=6.927
DRAW=7.107
DRAW=7.407
DRAW=7.279
DRAW=7.353
DRAW=7.180
DRAW=7.047
DRAW=7.936
DRAW=7.131
DRAW=8.316
DRAW=8.652
DRAW=7.197
DRAW=6.962
DRAW=7.917
DRAW=8.789
DRAW=7.683
DRAW=7.687
DRAW=7.110
DRAW=6.961
DRAW=7.484
DRAW=7.053
DRAW=7.611
DRAW=8.402
DRAW=7.110
DRAW=6.952
DRAW=7.766
DRAW=9.313
DRAW=7.276
DRAW=7.346
DRAW=8.409
DRAW=7.018
DRAW=7.589
DRAW=7.413
DRAW=7.242
DRAW=7.429
DRAW=7.092
DRAW=6.987
DRAW=7.027
DRAW=7.570
DRAW=8.485
DRAW=9.606
DRAW=9.305
DRAW=6.438
DRAW=6.444
DRAW=4.534
DRAW=6.062
DRAW=4.513
DRAW=9.083
DRAW=7.577
DRAW=6.954
DRAW=5.301
DRAW=10.694
DRAW=6.305
DRAW=5.546
DRAW=5.368
DRAW=5.808
DRAW=5.309
DRAW=6.229
DRAW=6.574
DRAW=5.426
DRAW=6.131
DRAW=5.759
DRAW=9.144
DRAW=7.256
DRAW=7.761
DRAW=5.311
DRAW=5.583
DRAW=9.606
DRAW=7.724
DRAW=8.321
DRAW=8.244
DRAW=7.160
DRAW=7.412
DRAW=7.472
DRAW=7.115
DRAW=9.499
DRAW=8.285
DRAW=6.939
DRAW=7.101
DRAW=7.031
DRAW=7.112
DRAW=6.966
DRAW=7.895
DRAW=7.000
DRAW=6.984
DRAW=7.063
DRAW=6.913
DRAW=10.527
DRAW=7.616
DRAW=5.287
DRAW=5.459
DRAW=6.676
DRAW=9.213
DRAW=8.389
DRAW=8.781
DRAW=8.793
DRAW=7.668
DRAW=7.740
DRAW=7.930
DRAW=8.677
DRAW=8.376
DRAW=7.979
DRAW=7.079
DRAW=7.037
DRAW=6.952
DRAW=12.348
DRAW=10.556
DRAW=21.856
DRAW=5.769
DRAW=2.739
DRAW=5.701
DRAW=2.638
DRAW=2.961
DRAW=2.976
DRAW=2.618
DRAW=3.265
DRAW=8.430
DRAW=4.295
DRAW=3.207
DRAW=2.655
DRAW=2.569
DRAW=2.770
DRAW=2.719
DRAW=3.460
DRAW=3.948
DRAW=3.413
DRAW=3.613
DRAW=7.778
DRAW=5.982
DRAW=4.565
DRAW=4.554
DRAW=4.190
DRAW=3.122
DRAW=7.212
DRAW=3.987
DRAW=3.622
DRAW=3.577
DRAW=6.021
DRAW=5.799
DRAW=5.793
DRAW=4.166
DRAW=3.946
DRAW=4.048
DRAW=3.719
DRAW=2.803
DRAW=4.054
DRAW=4.582
DRAW=3.800
DRAW=5.491
DRAW=4.747
DRAW=4.804
DRAW=9.434
DRAW=10.367
DRAW=9.756
DRAW=9.485
DRAW=7.847
DRAW=7.668
DRAW=7.596
DRAW=9.655
DRAW=8.080
DRAW=6.924
DRAW=4.598
DRAW=4.602
DRAW=8.330
DRAW=5.688
DRAW=10.471
DRAW=9.282
DRAW=7.709
DRAW=6.935
DRAW=7.149
DRAW=7.031
DRAW=8.012
DRAW=7.982
DRAW=7.939
DRAW=6.985
DRAW=7.046
DRAW=7.214
DRAW=8.363
DRAW=7.670
DRAW=7.614
DRAW=7.630
DRAW=7.815
DRAW=7.064
DRAW=8.147
DRAW=7.192
DRAW=6.972
DRAW=7.006
DRAW=7.080
DRAW=7.954
DRAW=7.868
DRAW=5.366
DRAW=5.442
DRAW=5.307
DRAW=8.317
DRAW=5.436
DRAW=5.984
DRAW=9.802
DRAW=8.603
DRAW=9.151
DRAW=8.332
DRAW=7.980
DRAW=8.256
DRAW=8.644
DRAW=9.396
DRAW=8.096
DRAW=7.953
DRAW=7.821
DRAW=7.688
DRAW=10.240
DRAW=7.086
DRAW=5.298
DRAW=7.923
DRAW=5.489
DRAW=10.246
DRAW=9.515
DRAW=7.843
DRAW=6.935
DRAW=7.056
DRAW=7.334
DRAW=8.074
DRAW=7.705
DRAW=6.950
DRAW=5.151
DRAW=4.875
DRAW=4.720
DRAW=3.779
DRAW=4.038
DRAW=4.017
DRAW=6.221
DRAW=4.085
DRAW=4.496
DRAW=6.912
DRAW=7.116
DRAW=7.200
DRAW=7.119
DRAW=6.999
DRAW=8.221
DRAW=9.150
DRAW=9.745
DRAW=7.690
DRAW=7.526
DRAW=8.030
DRAW=10.167
DRAW=25.911
DRAW=13.105
DRAW=12.064
DRAW=10.293
DRAW=8.715
DRAW=9.348
DRAW=13.314
DRAW=5.538
DRAW=6.109
DRAW=5.369
DRAW=5.496
DRAW=5.057
DRAW=5.753
DRAW=9.807
DRAW=10.278
DRAW=10.250
DRAW=5.391
DRAW=5.326
DRAW=5.209
DRAW=5.234
DRAW=7.272
DRAW=7.152
DRAW=7.199
DRAW=7.344
DRAW=7.382
DRAW=7.798
DRAW=7.133
DRAW=7.051
DRAW=7.200
DRAW=8.076
DRAW=7.967
DRAW=8.087
DRAW=7.131
DRAW=7.188
DRAW=7.041
DRAW=8.260
DRAW=8.256
DRAW=8.259
DRAW=12.337
DRAW=7.710
DRAW=6.154
DRAW=5.048
DRAW=5.380
DRAW=7.035
DRAW=10.306
DRAW=7.105
DRAW=7.222
DRAW=7.348
DRAW=7.857
DRAW=8.046
DRAW=7.477
DRAW=9.763
DRAW=7.340
DRAW=7.185
DRAW=7.733
DRAW=7.649
DRAW=7.160
DRAW=11.119
DRAW=16.537
DRAW=5.901
DRAW=4.646
** Activity (main) Pause, UserClosed = false **
DRAW=3.781
paused
sensor listener tear down

using the same code in a different sub (that will give the same result) will take much less time:

DRAW=0.407
DRAW=0.382
DRAW=0.404
DRAW=0.491
DRAW=0.539
DRAW=0.412
DRAW=0.460
DRAW=0.415
DRAW=0.451
DRAW=0.468
DRAW=0.426
DRAW=0.481
DRAW=0.377
DRAW=0.436
DRAW=0.400
DRAW=0.401
DRAW=0.421
DRAW=0.359
DRAW=0.384
DRAW=0.435
DRAW=0.468
DRAW=0.421
DRAW=0.938
DRAW=0.401
DRAW=0.419
DRAW=0.411
DRAW=0.448
DRAW=0.435
DRAW=0.389
DRAW=0.412
DRAW=0.412
DRAW=0.428
DRAW=0.400
DRAW=0.538
DRAW=0.418
DRAW=0.407
DRAW=0.433
DRAW=0.421
DRAW=0.407
DRAW=0.420
DRAW=0.446
DRAW=0.518
DRAW=0.427
DRAW=0.480
DRAW=0.403
DRAW=0.444
DRAW=0.489
DRAW=0.406
DRAW=0.448
DRAW=0.373
DRAW=0.407
DRAW=0.455
DRAW=0.530
DRAW=0.403
DRAW=0.374
DRAW=0.409
DRAW=0.411
DRAW=0.409
DRAW=0.606
DRAW=0.412
DRAW=0.431
DRAW=0.616
DRAW=0.406
DRAW=0.465
DRAW=0.401
DRAW=0.394
DRAW=0.402
DRAW=0.427
DRAW=1.336
DRAW=0.460
DRAW=0.391
DRAW=0.405
DRAW=0.431
DRAW=0.407
DRAW=0.453
DRAW=0.442
DRAW=0.422
DRAW=0.452
DRAW=0.485
DRAW=0.416
DRAW=0.504
DRAW=0.430
DRAW=0.452
DRAW=0.513
DRAW=0.457
DRAW=0.494
DRAW=0.458
DRAW=0.404
DRAW=0.483
DRAW=0.489
DRAW=0.423
DRAW=0.433
DRAW=0.403
DRAW=0.743
DRAW=0.419
DRAW=0.415
DRAW=0.403
DRAW=0.442
DRAW=0.398
DRAW=0.417
DRAW=0.401
DRAW=0.410
DRAW=0.491
DRAW=0.420
DRAW=0.453
DRAW=0.407
DRAW=0.407
DRAW=0.427
DRAW=0.426
DRAW=0.532
DRAW=0.407
DRAW=0.399
DRAW=0.418
DRAW=0.407
DRAW=0.418
DRAW=0.462
DRAW=0.425
DRAW=0.418
DRAW=0.393
DRAW=0.526
DRAW=0.630
DRAW=0.439
DRAW=0.437
DRAW=0.438
DRAW=0.421
DRAW=0.557
DRAW=0.422
DRAW=0.426
DRAW=0.435
DRAW=0.366
DRAW=0.407
DRAW=0.408
DRAW=0.414
DRAW=0.434
DRAW=0.535
DRAW=0.417
DRAW=0.409
DRAW=0.427
DRAW=0.452
DRAW=0.426
DRAW=0.459
DRAW=0.447
DRAW=0.423
DRAW=0.434
DRAW=0.412
DRAW=0.384
DRAW=0.404
DRAW=0.418
DRAW=0.509
DRAW=0.464
DRAW=0.376
DRAW=0.412
DRAW=0.450
DRAW=0.423
DRAW=0.429
DRAW=0.394
DRAW=0.427
DRAW=0.466
DRAW=0.453
DRAW=0.430
DRAW=0.412
DRAW=0.433
DRAW=0.415
DRAW=0.424
DRAW=0.435
DRAW=0.399
DRAW=0.374
DRAW=0.410
DRAW=0.405
DRAW=0.463
DRAW=0.422
DRAW=0.423
DRAW=0.417
DRAW=0.469
DRAW=0.442
DRAW=0.429
DRAW=0.404
DRAW=0.388
DRAW=0.384
DRAW=0.373
DRAW=0.493
DRAW=0.474
DRAW=0.471
DRAW=0.431
DRAW=0.522
DRAW=0.920
DRAW=0.437
DRAW=0.443
DRAW=0.435
DRAW=0.449
DRAW=0.433
DRAW=0.466
DRAW=0.373
DRAW=0.402
DRAW=0.414
DRAW=0.412
DRAW=0.416
DRAW=0.389
DRAW=0.391
DRAW=0.405
DRAW=0.423
DRAW=0.400
DRAW=0.395
DRAW=0.383
DRAW=0.403
DRAW=0.450
DRAW=0.399
DRAW=0.419
DRAW=0.537
DRAW=0.443
DRAW=0.511
DRAW=0.423
DRAW=0.453
DRAW=0.400
DRAW=0.413
DRAW=0.437
DRAW=0.444
DRAW=0.418
DRAW=0.413
DRAW=0.792
DRAW=0.444
DRAW=0.431
DRAW=0.401
DRAW=0.596
DRAW=0.389
DRAW=0.429
DRAW=0.862
DRAW=0.428
DRAW=0.421
DRAW=0.410
DRAW=0.507
DRAW=0.457
DRAW=0.409
DRAW=0.430
DRAW=0.413
DRAW=0.414
DRAW=0.417
DRAW=0.406
DRAW=0.470
DRAW=0.432
DRAW=0.376
DRAW=0.426
DRAW=0.414
DRAW=0.396
DRAW=0.928
DRAW=0.491
DRAW=0.420
DRAW=0.432
DRAW=0.515
DRAW=0.445
DRAW=0.477
DRAW=0.474
DRAW=0.454
DRAW=0.445
DRAW=0.413
DRAW=0.460
DRAW=0.379
DRAW=0.398
DRAW=0.404
DRAW=0.449
DRAW=0.438
DRAW=0.426
DRAW=0.406
DRAW=0.400
DRAW=0.436
DRAW=0.535
DRAW=0.415
DRAW=0.415
DRAW=0.706
DRAW=0.415
DRAW=0.414
DRAW=0.518
DRAW=0.382
DRAW=0.421
DRAW=0.400
DRAW=0.408
DRAW=0.403
DRAW=0.455
DRAW=0.421
DRAW=0.422
DRAW=0.476
DRAW=0.413
DRAW=0.403
DRAW=0.460
DRAW=0.409
DRAW=0.446
DRAW=0.424
DRAW=0.410
DRAW=0.412
DRAW=0.412
DRAW=0.401
DRAW=1.126
DRAW=0.456
DRAW=0.398
DRAW=0.404
DRAW=0.389
DRAW=0.424
DRAW=0.428
DRAW=0.447
DRAW=0.436
DRAW=0.443
DRAW=0.426
DRAW=0.534
DRAW=0.491
DRAW=0.462
DRAW=0.481
DRAW=0.422
DRAW=0.468
DRAW=0.433
DRAW=0.377
DRAW=0.404
DRAW=0.400
DRAW=0.452
DRAW=0.402
DRAW=0.458
DRAW=0.571
DRAW=0.455
DRAW=0.459
DRAW=0.573
DRAW=0.450
DRAW=0.457
DRAW=0.408
DRAW=0.408
DRAW=0.403
DRAW=0.408
DRAW=0.384
DRAW=0.480
DRAW=0.467
DRAW=0.401
DRAW=0.439
DRAW=0.433
DRAW=0.461
DRAW=0.462
DRAW=0.646
DRAW=0.450
DRAW=0.570
DRAW=0.485
DRAW=0.450
DRAW=0.429
DRAW=0.417
DRAW=0.715
DRAW=0.402
DRAW=0.443
DRAW=0.402
DRAW=0.503
DRAW=0.462
DRAW=0.421
DRAW=0.449
DRAW=0.405
DRAW=0.435
DRAW=1.346
DRAW=0.436
DRAW=1.531
DRAW=0.582
DRAW=0.462
DRAW=0.480
DRAW=0.415
DRAW=0.509
DRAW=0.425
DRAW=0.439
DRAW=1.327
DRAW=0.530
DRAW=0.432
DRAW=0.471
DRAW=0.434
DRAW=0.424
DRAW=0.445
DRAW=0.415
DRAW=0.412
DRAW=0.425
DRAW=0.426
DRAW=0.431
DRAW=0.414
DRAW=0.468
DRAW=0.442
DRAW=0.434
DRAW=0.425
DRAW=0.434
DRAW=0.480
DRAW=0.525
DRAW=0.529
DRAW=0.436
DRAW=0.523
DRAW=0.457
DRAW=0.474
DRAW=0.677
DRAW=0.446
DRAW=0.425
DRAW=0.431
DRAW=0.426
DRAW=0.465
DRAW=0.422
DRAW=0.416
DRAW=0.424
DRAW=0.382
DRAW=0.417
DRAW=0.413
DRAW=0.494
DRAW=0.463
DRAW=0.446
DRAW=0.763
DRAW=0.422
DRAW=0.461
DRAW=0.467
DRAW=0.415
DRAW=0.736
DRAW=0.407
DRAW=0.416
DRAW=0.453
DRAW=0.398
DRAW=0.433
DRAW=0.431
DRAW=0.433
DRAW=0.454
DRAW=0.410
DRAW=0.382
DRAW=0.408
DRAW=0.389
DRAW=0.602
DRAW=0.454
DRAW=0.464
DRAW=0.423
DRAW=0.425
DRAW=0.518
DRAW=0.689
DRAW=0.411
DRAW=0.411
DRAW=0.485
DRAW=0.418
DRAW=0.441
DRAW=0.447
DRAW=0.369
DRAW=0.406
DRAW=0.445
DRAW=0.520
DRAW=0.493
DRAW=0.427
DRAW=0.431
DRAW=0.506
DRAW=0.395
DRAW=0.427
DRAW=0.386
DRAW=0.399
DRAW=0.423
DRAW=0.404
DRAW=0.398
DRAW=0.375
DRAW=0.619
DRAW=0.413
DRAW=0.404
DRAW=0.397
DRAW=0.416
DRAW=0.390
DRAW=0.425
DRAW=0.416
DRAW=0.403
DRAW=0.403
DRAW=0.377
DRAW=0.413
DRAW=0.408
DRAW=0.400
DRAW=0.456
DRAW=0.385
DRAW=0.409
DRAW=0.647
DRAW=0.455
DRAW=0.484
DRAW=0.437
DRAW=0.396
DRAW=0.399
DRAW=0.411
DRAW=0.400
DRAW=0.425
DRAW=0.464
DRAW=0.559
DRAW=0.410
DRAW=0.447
DRAW=0.471
DRAW=0.403
DRAW=0.707
DRAW=0.431
DRAW=0.414
DRAW=0.692
DRAW=0.410
DRAW=0.378
DRAW=0.478
DRAW=0.399
DRAW=0.459
DRAW=0.460
DRAW=0.398
DRAW=0.453
DRAW=0.403
DRAW=0.786
DRAW=0.436
DRAW=0.406
DRAW=0.403
DRAW=0.430
DRAW=0.887
DRAW=0.437
DRAW=0.427
DRAW=0.426
DRAW=0.437
DRAW=0.404
DRAW=0.421
DRAW=0.427
DRAW=0.414
DRAW=0.449
DRAW=0.408
DRAW=0.462
DRAW=0.632
DRAW=0.372
DRAW=0.455
DRAW=0.416
DRAW=0.924
DRAW=0.448
DRAW=0.411
DRAW=0.422
DRAW=0.404
DRAW=0.440
DRAW=0.414
DRAW=0.401
DRAW=0.385
DRAW=0.418
DRAW=0.422
DRAW=0.434
DRAW=0.429
DRAW=0.463
DRAW=0.409
DRAW=0.404
DRAW=1.245
DRAW=0.467
DRAW=0.402
DRAW=0.412
DRAW=0.941
DRAW=0.402
DRAW=0.410
DRAW=0.403
DRAW=0.378
DRAW=0.413
DRAW=0.633
DRAW=0.441
DRAW=0.421
DRAW=0.374
DRAW=0.428
DRAW=0.432
DRAW=0.440
DRAW=0.416
DRAW=0.422
DRAW=0.412
DRAW=0.452
DRAW=0.433
DRAW=0.452
DRAW=0.378
DRAW=0.421
DRAW=0.405
DRAW=0.494
DRAW=0.398
DRAW=0.404
DRAW=0.452
DRAW=0.400
DRAW=0.394
DRAW=0.388
DRAW=0.388
DRAW=0.355
DRAW=0.729
DRAW=0.413
DRAW=0.419
DRAW=0.415
DRAW=0.383
DRAW=0.466
DRAW=0.554
DRAW=0.412
DRAW=0.396
DRAW=0.486
DRAW=1.235
DRAW=0.443
DRAW=0.408
DRAW=0.409
DRAW=0.483
DRAW=0.571
DRAW=0.449
DRAW=0.441
DRAW=0.401
DRAW=0.418
DRAW=0.399
DRAW=0.443
DRAW=0.530
DRAW=0.456
DRAW=0.696
DRAW=0.512
DRAW=0.373
DRAW=0.393
DRAW=0.721
DRAW=0.396
DRAW=0.416
DRAW=0.430
DRAW=0.667
DRAW=1.026
DRAW=1.023
DRAW=0.459
DRAW=0.612
DRAW=0.506
DRAW=0.401
DRAW=0.507
DRAW=0.796
DRAW=0.444
DRAW=0.400
DRAW=0.448
DRAW=0.628
DRAW=0.655
DRAW=0.602
DRAW=0.601
DRAW=0.638
DRAW=1.531
DRAW=1.490
DRAW=0.459
DRAW=0.818
DRAW=1.471
DRAW=0.683
DRAW=1.479
DRAW=0.475
DRAW=0.419
DRAW=0.501
DRAW=0.522
DRAW=0.462
DRAW=0.677
DRAW=0.699
DRAW=0.623
DRAW=0.805
DRAW=0.762
DRAW=0.628
DRAW=0.571
DRAW=0.553
DRAW=0.626
DRAW=3.556
DRAW=5.759
DRAW=1.397
DRAW=1.118
DRAW=1.138
DRAW=1.125
DRAW=1.111
DRAW=1.169
DRAW=1.844
DRAW=1.706
DRAW=1.941
DRAW=1.771
DRAW=6.116
DRAW=0.810
DRAW=0.710
DRAW=0.563
DRAW=0.644
DRAW=0.567
DRAW=1.505
DRAW=2.682
DRAW=1.766
DRAW=18.652
DRAW=0.714
DRAW=0.779
DRAW=0.688
DRAW=0.736
DRAW=1.093
DRAW=0.736
DRAW=0.790
DRAW=1.313
DRAW=1.205
DRAW=1.272
DRAW=1.309
DRAW=1.297
DRAW=3.349
DRAW=1.207
DRAW=0.722
DRAW=0.783
DRAW=0.722
DRAW=0.803
DRAW=0.669
DRAW=0.709
DRAW=0.996
DRAW=0.864
DRAW=0.704
DRAW=0.655
DRAW=0.519
DRAW=0.644
DRAW=2.441
DRAW=4.924
DRAW=6.365
DRAW=0.672
DRAW=0.750
DRAW=0.660
DRAW=0.707
DRAW=0.673
DRAW=1.213
DRAW=0.581
DRAW=0.547
DRAW=0.642
DRAW=0.629
DRAW=1.644
DRAW=0.585
DRAW=0.745
DRAW=0.528
DRAW=0.418
DRAW=0.443
DRAW=0.668
DRAW=0.817
DRAW=1.024
DRAW=0.698
DRAW=0.763
DRAW=0.808
DRAW=0.988
DRAW=1.365
DRAW=1.358
DRAW=1.325
DRAW=3.287
DRAW=1.283
DRAW=1.266
DRAW=1.288
DRAW=1.458
DRAW=1.132
DRAW=1.068
DRAW=1.214
DRAW=0.860
DRAW=0.862
DRAW=1.186
DRAW=0.797
DRAW=1.338
DRAW=1.005
DRAW=0.465
DRAW=0.439
DRAW=0.403
DRAW=0.610
DRAW=0.472
DRAW=0.388
DRAW=2.407
DRAW=0.504
DRAW=0.422
DRAW=0.508
DRAW=0.487
DRAW=0.469
DRAW=0.408
DRAW=0.623
DRAW=0.456
DRAW=0.473
DRAW=0.523
DRAW=0.530
DRAW=0.496
DRAW=1.003
DRAW=0.963
DRAW=0.817
DRAW=2.684
DRAW=0.759
DRAW=0.971
DRAW=0.792
DRAW=0.775
DRAW=1.280
DRAW=1.292
DRAW=1.446
DRAW=1.785
DRAW=1.805
DRAW=1.938
DRAW=1.833
DRAW=1.768
DRAW=4.629
DRAW=2.568
DRAW=1.764
DRAW=1.980
DRAW=1.700
DRAW=1.834
DRAW=1.796
DRAW=1.783
DRAW=2.076
DRAW=1.365
DRAW=0.692
DRAW=0.560
DRAW=0.640
DRAW=0.583
DRAW=2.192
DRAW=0.600
DRAW=0.753
DRAW=0.715
DRAW=2.094
DRAW=1.853
DRAW=1.707
DRAW=4.254
DRAW=2.357
DRAW=1.758
DRAW=1.280
DRAW=2.781
DRAW=0.983
DRAW=0.724
DRAW=0.828
DRAW=1.030
DRAW=1.000
DRAW=3.360
DRAW=2.402
DRAW=5.367
DRAW=1.298
DRAW=1.275
DRAW=1.270
DRAW=1.357
DRAW=0.849
DRAW=0.835
DRAW=0.581
DRAW=0.508
DRAW=0.621
DRAW=1.387
DRAW=1.280
DRAW=2.201
DRAW=2.519
DRAW=0.738
DRAW=0.654
DRAW=0.637
DRAW=0.728
DRAW=0.576
DRAW=0.519
DRAW=0.541
DRAW=1.222
DRAW=1.443
DRAW=0.558
DRAW=0.535
DRAW=2.569
DRAW=1.240
DRAW=0.948
DRAW=0.961
DRAW=0.728
DRAW=0.625
DRAW=0.553
DRAW=0.520
DRAW=0.517
DRAW=1.805
DRAW=3.456
DRAW=2.519
DRAW=1.743
DRAW=1.709
DRAW=1.782
DRAW=1.724
DRAW=3.003
DRAW=1.724
DRAW=1.700
DRAW=1.781
DRAW=1.542
DRAW=0.994
DRAW=1.675
DRAW=0.697
DRAW=0.756
DRAW=0.676
DRAW=0.746
DRAW=1.205
DRAW=2.877
DRAW=1.249
DRAW=1.221
DRAW=2.417
DRAW=2.557
DRAW=2.411
DRAW=2.426
DRAW=3.856
DRAW=2.390
DRAW=2.376
DRAW=2.659
DRAW=1.692
DRAW=2.438
DRAW=1.732
DRAW=1.742
DRAW=2.005
DRAW=1.782
DRAW=1.699
DRAW=3.456
DRAW=1.712
DRAW=1.748
DRAW=1.701
DRAW=1.709
DRAW=1.724
DRAW=3.975
DRAW=2.982
DRAW=1.870
DRAW=2.511
DRAW=1.229
DRAW=1.207
DRAW=2.131
DRAW=1.253
DRAW=1.739
DRAW=3.120
DRAW=1.731
DRAW=2.281
DRAW=3.598
DRAW=2.188
DRAW=1.696
DRAW=1.929
DRAW=1.266
DRAW=1.229
DRAW=1.216
DRAW=2.278
DRAW=1.807
DRAW=2.443
DRAW=1.729
DRAW=1.747
DRAW=1.694
DRAW=1.734
DRAW=1.789
DRAW=1.712
DRAW=0.973
DRAW=0.949
DRAW=0.944
DRAW=0.959
DRAW=1.093
DRAW=3.383
DRAW=0.669
DRAW=1.177
DRAW=0.572
DRAW=0.562
DRAW=0.419
DRAW=0.550
DRAW=0.642
DRAW=0.910
DRAW=0.547
DRAW=0.552
DRAW=0.533
DRAW=0.397
DRAW=0.517
DRAW=0.837
DRAW=0.419
DRAW=0.426
DRAW=0.486
DRAW=0.498
DRAW=0.504
DRAW=0.499
DRAW=0.507
DRAW=0.504
DRAW=0.543
DRAW=0.502
DRAW=0.765
DRAW=2.112
DRAW=0.740
DRAW=1.077
DRAW=1.154
DRAW=1.206
DRAW=1.239
DRAW=2.152
DRAW=1.878
DRAW=1.220
DRAW=1.227
DRAW=1.269
DRAW=1.233
DRAW=1.243
DRAW=1.439
DRAW=1.296
DRAW=1.268
DRAW=1.244
DRAW=1.288
DRAW=1.202
DRAW=1.188
DRAW=1.263
DRAW=1.243
DRAW=1.260
DRAW=1.240
DRAW=1.212
DRAW=1.592
DRAW=1.229
DRAW=1.494
DRAW=1.313
DRAW=1.254
DRAW=1.448
DRAW=1.325
DRAW=1.228
DRAW=1.340
DRAW=1.230
DRAW=1.231
DRAW=1.654
DRAW=1.354
DRAW=1.232
DRAW=1.461
DRAW=1.210
DRAW=1.228
DRAW=1.300
DRAW=1.218
DRAW=1.256
DRAW=1.263
DRAW=1.229
DRAW=1.266
DRAW=1.331
DRAW=1.625
DRAW=1.704
DRAW=1.819
DRAW=2.159
DRAW=1.767
DRAW=1.768
DRAW=3.194
DRAW=1.706
DRAW=1.976
DRAW=1.767
DRAW=1.733
DRAW=1.719
DRAW=1.925
DRAW=2.736
DRAW=2.063
DRAW=1.717
DRAW=2.581
DRAW=1.722
DRAW=2.460
DRAW=1.267
DRAW=1.377
DRAW=1.214
DRAW=1.194
DRAW=1.308
DRAW=2.235
DRAW=1.223
DRAW=1.227
DRAW=1.227
DRAW=1.247
DRAW=1.319
DRAW=1.673
DRAW=1.736
DRAW=2.963
DRAW=1.717
DRAW=1.797
DRAW=1.852
DRAW=1.846
DRAW=1.727
DRAW=1.941
DRAW=1.777
DRAW=1.754
DRAW=1.856
DRAW=3.211
DRAW=1.772
DRAW=2.508
DRAW=2.654
DRAW=2.420
DRAW=2.816
DRAW=1.801
DRAW=1.734
DRAW=1.985
DRAW=5.028
DRAW=1.107
DRAW=1.107
DRAW=7.896
DRAW=3.478
DRAW=0.692
DRAW=0.630
DRAW=0.573
DRAW=0.539
DRAW=0.532
DRAW=0.514
DRAW=0.686
DRAW=0.705
DRAW=0.818
DRAW=0.658
DRAW=1.063
DRAW=1.243
DRAW=1.804
DRAW=1.715
DRAW=2.203
DRAW=1.889
DRAW=1.707
DRAW=1.750
DRAW=1.716
DRAW=1.675
DRAW=1.720
DRAW=12.022
DRAW=1.413
DRAW=1.433
DRAW=0.960
DRAW=0.925
DRAW=1.058
DRAW=1.104
DRAW=2.308
DRAW=1.405
DRAW=0.961
DRAW=0.984
DRAW=0.965
DRAW=1.005
DRAW=1.316
DRAW=1.137
DRAW=1.004
DRAW=0.987
DRAW=1.796
DRAW=1.715
DRAW=1.755
DRAW=1.725
DRAW=1.737
DRAW=1.731
DRAW=1.731
DRAW=1.717
DRAW=1.739
DRAW=1.687
DRAW=1.723
DRAW=1.233
DRAW=1.349
DRAW=1.229
DRAW=1.281
DRAW=1.302
DRAW=1.240
DRAW=1.313
DRAW=1.237
DRAW=1.221
DRAW=1.252
DRAW=1.442
DRAW=1.274
DRAW=1.223
DRAW=1.376
DRAW=1.250
DRAW=1.241
DRAW=1.443
DRAW=1.237
DRAW=1.195
DRAW=1.330
DRAW=1.716
DRAW=1.758
DRAW=1.826
DRAW=1.700
DRAW=1.717
DRAW=1.768
DRAW=1.779
DRAW=1.710
DRAW=8.385
DRAW=1.695
DRAW=1.759
DRAW=1.962
DRAW=1.774
DRAW=4.632
DRAW=2.811
DRAW=1.796
DRAW=1.806
DRAW=2.069
DRAW=1.802
DRAW=1.677
DRAW=2.992
DRAW=1.785
DRAW=1.803
DRAW=1.915
DRAW=1.759
DRAW=1.726
DRAW=2.380
DRAW=1.784
DRAW=1.842
DRAW=1.795
DRAW=1.737
DRAW=1.790
DRAW=1.971
DRAW=1.774
DRAW=1.767
DRAW=1.893
DRAW=1.798
DRAW=2.437
DRAW=2.957
DRAW=1.324
DRAW=1.281
DRAW=1.078
DRAW=1.098
DRAW=1.564
DRAW=1.514
DRAW=0.740
DRAW=0.503
DRAW=0.512
DRAW=0.511
DRAW=0.575
DRAW=0.562
DRAW=0.543
DRAW=0.586
DRAW=0.517
DRAW=0.631
DRAW=0.828
DRAW=0.466
DRAW=0.458
DRAW=0.424
** Activity (main) Pause, UserClosed = false **
DRAW=0.437
paused
sensor listener tear down

when you say:
but I explained why (event!)

call a sub is not the same then calling stage.draw? a sub is not also an Event?
from this test i think its better (if i have to call each frame stage.draw because i animate my textures,.) then its better to do it in a own sub and not call stage.draw
correct?

thank you.
 

Informatix

Expert
Licensed User
Longtime User
ok when i run the example i am getting 60 fps but this is only 1 task. in a game with lot of stuff and box2d physic calculation and drawing tilemap from tiled it will have a big influence since the stage.draw alone takes in your example about 8ms (after few seconds)

you can see in the logs that the time the stage.draw takes changes after a while (Galaxy S5 android 6.0.1)

STAGE=61
STAGE=60
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=61
STAGE=60
STAGE=61
STAGE=60
STAGE=61
STAGE=61
STAGE=61
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor listener setup
OGL renderer: Adreno (TM) 330
OGL vendor: Qualcomm
OGL version: OpenGL ES 3.0 [email protected] AU@ (GIT@Ia10634f51b)
OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
framebuffer: (5, 6, 5, 0)
depthbuffer: (16)
stencilbuffer: (0)
samples: (0)
coverage sampling: (false)
Managed meshes/app: { }
Managed textures/app: { }
Managed shaders/app: { }
Managed buffers/app: { }
DRAW=5.970
DRAW=4.737
DRAW=3.124
DRAW=2.818
DRAW=2.933
DRAW=3.249
DRAW=2.873
DRAW=2.614
DRAW=3.084
DRAW=3.028
DRAW=2.895
DRAW=3.058
DRAW=2.933
DRAW=2.696
DRAW=2.987
DRAW=2.675
DRAW=2.582
DRAW=4.861
DRAW=2.832
DRAW=3.819
DRAW=3.991
DRAW=2.824
DRAW=2.754
DRAW=3.919
DRAW=3.339
DRAW=3.220
DRAW=3.572
DRAW=2.850
DRAW=3.024
DRAW=2.662
DRAW=3.552
DRAW=4.132
DRAW=3.006
DRAW=3.002
DRAW=2.996
DRAW=2.752
DRAW=3.608
DRAW=7.144
DRAW=2.775
DRAW=3.294
DRAW=3.207
DRAW=4.174
DRAW=3.021
DRAW=2.884
DRAW=2.762
DRAW=2.845
DRAW=3.426
DRAW=2.599
DRAW=5.298
DRAW=2.763
DRAW=2.859
DRAW=2.566
DRAW=2.837
DRAW=2.724
DRAW=2.774
DRAW=2.794
DRAW=2.667
DRAW=3.033
DRAW=2.707
DRAW=2.624
DRAW=2.937
DRAW=2.678
DRAW=2.852
DRAW=2.869
DRAW=2.650
DRAW=3.396
DRAW=2.897
DRAW=2.888
DRAW=2.748
DRAW=2.818
DRAW=3.048
DRAW=3.000
DRAW=2.632
DRAW=3.577
DRAW=3.285
DRAW=3.887
DRAW=2.757
DRAW=5.601
DRAW=11.003
DRAW=5.344
DRAW=3.808
DRAW=2.988
DRAW=2.853
DRAW=3.910
DRAW=6.354
DRAW=2.999
DRAW=2.909
DRAW=3.056
DRAW=2.997
DRAW=3.703
DRAW=2.982
DRAW=2.970
DRAW=2.730
DRAW=2.680
DRAW=2.786
DRAW=3.268
DRAW=2.849
DRAW=2.875
DRAW=3.444
DRAW=2.740
DRAW=2.713
DRAW=2.860
DRAW=2.659
DRAW=2.659
DRAW=2.977
DRAW=2.665
DRAW=2.696
DRAW=5.349
DRAW=2.568
DRAW=2.771
DRAW=5.586
DRAW=3.210
DRAW=2.772
DRAW=2.819
DRAW=3.187
DRAW=2.711
DRAW=8.679
DRAW=2.712
DRAW=2.682
DRAW=2.735
DRAW=2.673
DRAW=2.573
DRAW=5.193
DRAW=5.141
DRAW=2.847
DRAW=3.359
DRAW=2.675
DRAW=2.936
DRAW=3.385
DRAW=3.526
DRAW=2.705
DRAW=3.265
DRAW=2.957
DRAW=2.760
DRAW=2.684
DRAW=2.978
DRAW=2.604
DRAW=2.933
DRAW=3.404
DRAW=2.670
DRAW=2.826
DRAW=3.063
DRAW=2.652
DRAW=3.144
DRAW=6.146
DRAW=2.595
DRAW=3.354
DRAW=2.613
DRAW=3.083
DRAW=3.869
DRAW=5.392
DRAW=4.921
DRAW=4.662
DRAW=2.843
DRAW=3.412
DRAW=3.004
DRAW=2.999
DRAW=3.030
DRAW=2.933
DRAW=2.802
DRAW=2.740
DRAW=2.993
DRAW=2.807
DRAW=2.768
DRAW=3.219
DRAW=3.081
DRAW=4.612
DRAW=3.599
DRAW=2.774
DRAW=2.625
DRAW=2.684
DRAW=2.589
DRAW=2.610
DRAW=2.612
DRAW=2.590
DRAW=2.594
DRAW=2.671
DRAW=2.585
DRAW=2.799
DRAW=2.656
DRAW=4.189
DRAW=3.081
DRAW=2.923
DRAW=2.710
DRAW=2.745
DRAW=2.972
DRAW=4.063
DRAW=2.830
DRAW=3.253
DRAW=3.047
DRAW=2.674
DRAW=2.783
DRAW=3.289
DRAW=2.797
DRAW=2.834
DRAW=2.820
DRAW=2.655
DRAW=2.823
DRAW=2.827
DRAW=2.713
DRAW=6.016
DRAW=3.160
DRAW=3.098
DRAW=2.957
DRAW=2.946
DRAW=6.211
DRAW=2.620
DRAW=2.695
DRAW=2.889
DRAW=3.023
DRAW=2.595
DRAW=2.588
DRAW=2.734
DRAW=3.628
DRAW=2.678
DRAW=2.669
DRAW=2.737
DRAW=2.710
DRAW=4.392
DRAW=2.991
DRAW=4.162
DRAW=2.631
DRAW=2.529
DRAW=2.772
DRAW=4.411
DRAW=2.578
DRAW=2.729
DRAW=2.869
DRAW=3.056
DRAW=2.878
DRAW=2.677
DRAW=2.638
DRAW=2.701
DRAW=2.742
DRAW=2.702
DRAW=2.774
DRAW=2.731
DRAW=2.780
DRAW=3.176
DRAW=2.997
DRAW=4.183
DRAW=2.736
DRAW=2.695
DRAW=2.576
DRAW=2.603
DRAW=2.725
DRAW=3.058
DRAW=5.708
DRAW=3.080
DRAW=4.485
DRAW=3.964
DRAW=3.499
DRAW=3.475
DRAW=3.031
DRAW=3.091
DRAW=3.138
DRAW=3.164
DRAW=2.961
DRAW=3.069
DRAW=5.843
DRAW=4.496
DRAW=2.800
DRAW=2.853
DRAW=2.881
DRAW=3.392
DRAW=3.445
DRAW=3.452
DRAW=3.138
DRAW=2.990
DRAW=2.916
DRAW=2.747
DRAW=3.294
DRAW=4.193
DRAW=8.336
DRAW=3.357
DRAW=2.703
DRAW=2.843
DRAW=3.831
DRAW=2.889
DRAW=2.826
DRAW=2.970
DRAW=3.042
DRAW=2.949
DRAW=3.247
DRAW=2.678
DRAW=2.736
DRAW=2.996
DRAW=2.854
DRAW=3.153
DRAW=2.714
DRAW=2.853
DRAW=2.679
DRAW=3.019
DRAW=2.858
DRAW=3.076
DRAW=2.895
DRAW=3.164
DRAW=3.764
DRAW=2.940
DRAW=3.167
DRAW=3.604
DRAW=3.377
DRAW=3.372
DRAW=3.465
DRAW=3.217
DRAW=3.240
DRAW=3.645
DRAW=3.128
DRAW=3.253
DRAW=3.176
DRAW=3.219
DRAW=3.029
DRAW=3.588
DRAW=2.703
DRAW=2.954
DRAW=3.258
DRAW=2.994
DRAW=3.222
DRAW=3.275
DRAW=4.398
DRAW=3.028
DRAW=2.843
DRAW=3.154
DRAW=2.826
DRAW=3.533
DRAW=3.305
DRAW=3.063
DRAW=9.486
DRAW=3.787
DRAW=3.037
DRAW=3.986
DRAW=2.900
DRAW=3.058
DRAW=2.951
DRAW=3.435
DRAW=2.802
DRAW=3.139
DRAW=3.218
DRAW=3.537
DRAW=2.962
DRAW=3.072
DRAW=3.123
DRAW=3.491
DRAW=2.968
DRAW=3.539
DRAW=3.189
DRAW=2.803
DRAW=2.779
DRAW=3.257
DRAW=3.812
DRAW=3.107
DRAW=3.048
DRAW=2.780
DRAW=36.961
DRAW=2.879
DRAW=3.508
DRAW=3.082
DRAW=2.624
DRAW=2.756
DRAW=2.946
DRAW=2.892
DRAW=2.767
DRAW=2.660
DRAW=3.631
DRAW=3.913
DRAW=2.995
DRAW=3.265
DRAW=2.515
DRAW=2.827
DRAW=2.733
DRAW=2.896
DRAW=2.651
DRAW=5.556
DRAW=3.429
DRAW=8.713
DRAW=3.319
DRAW=2.917
DRAW=2.818
DRAW=3.727
DRAW=2.674
DRAW=2.578
DRAW=3.373
DRAW=3.321
DRAW=3.661
DRAW=3.391
DRAW=3.212
DRAW=3.568
DRAW=2.811
DRAW=3.401
DRAW=2.834
DRAW=2.871
DRAW=3.191
DRAW=2.933
DRAW=3.103
DRAW=2.989
DRAW=2.664
DRAW=3.104
DRAW=3.304
DRAW=3.548
DRAW=3.055
DRAW=3.213
DRAW=2.673
DRAW=3.040
DRAW=2.627
DRAW=2.609
DRAW=2.715
DRAW=2.890
DRAW=2.641
DRAW=3.047
DRAW=4.304
DRAW=2.580
DRAW=3.179
DRAW=2.606
DRAW=2.769
DRAW=3.565
DRAW=2.666
DRAW=2.688
DRAW=2.654
DRAW=2.766
DRAW=2.969
DRAW=2.633
DRAW=2.570
DRAW=2.609
DRAW=3.399
DRAW=2.846
DRAW=2.690
DRAW=3.804
DRAW=2.678
DRAW=2.948
DRAW=2.760
DRAW=2.777
DRAW=8.581
DRAW=5.073
DRAW=3.307
DRAW=2.519
DRAW=3.146
DRAW=3.396
DRAW=2.593
DRAW=3.346
DRAW=2.910
DRAW=3.928
DRAW=2.890
DRAW=3.005
DRAW=2.901
DRAW=3.632
DRAW=3.396
DRAW=2.791
DRAW=2.960
DRAW=3.144
DRAW=3.362
DRAW=3.417
DRAW=2.811
DRAW=3.005
DRAW=2.920
DRAW=2.656
DRAW=2.838
DRAW=2.856
DRAW=3.342
DRAW=3.030
DRAW=2.878
DRAW=2.886
DRAW=7.335
DRAW=3.663
DRAW=3.071
DRAW=4.068
DRAW=3.121
DRAW=4.208
DRAW=4.675
DRAW=3.472
DRAW=2.826
DRAW=2.698
DRAW=3.025
DRAW=4.438
DRAW=3.780
DRAW=2.854
DRAW=4.492
DRAW=2.932
DRAW=2.709
DRAW=2.852
DRAW=3.024
DRAW=2.851
DRAW=2.754
DRAW=2.986
DRAW=2.750
DRAW=2.754
DRAW=2.888
DRAW=2.743
DRAW=2.775
DRAW=2.709
DRAW=2.626
DRAW=2.640
DRAW=2.668
DRAW=2.671
DRAW=2.590
DRAW=3.024
DRAW=3.357
DRAW=3.421
DRAW=2.783
DRAW=2.609
DRAW=2.774
DRAW=2.855
DRAW=3.244
DRAW=3.068
DRAW=2.680
DRAW=2.846
DRAW=2.646
DRAW=2.895
DRAW=2.616
DRAW=2.726
DRAW=2.795
DRAW=2.637
DRAW=2.651
DRAW=2.754
DRAW=2.774
DRAW=2.659
DRAW=9.271
DRAW=2.913
DRAW=2.874
DRAW=2.782
DRAW=3.318
DRAW=3.262
DRAW=2.825
DRAW=2.772
DRAW=2.980
DRAW=2.883
DRAW=3.235
DRAW=3.354
DRAW=3.224
DRAW=2.759
DRAW=2.651
DRAW=2.541
DRAW=2.527
DRAW=2.517
DRAW=2.564
DRAW=2.794
DRAW=3.454
DRAW=2.819
DRAW=2.747
DRAW=2.689
DRAW=3.425
DRAW=2.552
DRAW=2.561
DRAW=2.519
DRAW=3.549
DRAW=3.017
DRAW=2.561
DRAW=2.559
DRAW=3.760
DRAW=3.097
DRAW=3.068
DRAW=3.033
DRAW=3.092
DRAW=2.604
DRAW=3.845
DRAW=3.452
DRAW=2.895
DRAW=2.644
DRAW=2.676
DRAW=2.628
DRAW=3.363
DRAW=2.607
DRAW=2.607
DRAW=2.891
DRAW=2.948
DRAW=2.583
DRAW=3.056
DRAW=2.508
DRAW=2.582
DRAW=2.512
DRAW=2.526
DRAW=3.719
DRAW=3.446
DRAW=2.563
DRAW=2.544
DRAW=2.534
DRAW=2.524
DRAW=2.543
DRAW=2.540
DRAW=2.546
DRAW=3.687
DRAW=3.460
DRAW=3.280
DRAW=3.213
DRAW=4.072
DRAW=3.179
DRAW=2.569
DRAW=2.534
DRAW=2.632
DRAW=3.275
DRAW=4.741
DRAW=3.774
DRAW=3.772
DRAW=3.695
DRAW=3.783
DRAW=3.778
DRAW=2.656
DRAW=5.330
DRAW=3.735
DRAW=3.760
DRAW=3.788
DRAW=4.604
DRAW=4.594
DRAW=9.446
DRAW=9.708
DRAW=11.278
DRAW=5.551
DRAW=4.583
DRAW=4.670
DRAW=5.725
DRAW=6.139
DRAW=9.095
DRAW=6.162
DRAW=4.926
DRAW=4.792
DRAW=3.402
DRAW=3.617
DRAW=7.404
DRAW=6.238
DRAW=5.257
DRAW=5.307
DRAW=5.995
DRAW=5.305
DRAW=5.514
DRAW=5.580
DRAW=5.683
DRAW=4.698
DRAW=5.362
DRAW=4.486
DRAW=5.798
DRAW=7.303
DRAW=7.000
DRAW=7.686
DRAW=7.607
DRAW=7.823
DRAW=12.443
DRAW=6.014
DRAW=5.167
DRAW=4.038
DRAW=4.863
DRAW=6.292
DRAW=5.022
DRAW=4.756
DRAW=4.707
DRAW=5.949
DRAW=10.370
DRAW=4.930
DRAW=4.894
DRAW=4.409
DRAW=5.388
DRAW=5.969
DRAW=3.869
DRAW=10.415
DRAW=12.372
DRAW=5.636
DRAW=4.666
DRAW=4.402
DRAW=4.918
DRAW=3.438
DRAW=3.517
DRAW=3.385
DRAW=4.707
DRAW=8.703
DRAW=10.044
DRAW=9.349
DRAW=5.384
DRAW=8.989
DRAW=6.013
DRAW=4.703
DRAW=4.950
DRAW=4.889
DRAW=7.042
DRAW=7.206
DRAW=8.123
DRAW=13.380
DRAW=5.269
DRAW=4.566
DRAW=5.703
DRAW=5.289
DRAW=5.342
DRAW=5.559
DRAW=6.496
DRAW=3.350
DRAW=3.375
DRAW=3.405
DRAW=3.316
DRAW=4.239
DRAW=3.750
DRAW=4.048
DRAW=5.967
DRAW=5.908
DRAW=8.383
DRAW=2.851
DRAW=2.671
DRAW=4.806
DRAW=6.881
DRAW=4.269
DRAW=2.749
DRAW=2.714
DRAW=2.686
DRAW=2.916
DRAW=2.636
DRAW=2.653
DRAW=2.793
DRAW=14.742
DRAW=5.293
DRAW=4.804
DRAW=5.183
DRAW=4.652
DRAW=6.198
DRAW=8.136
DRAW=8.991
DRAW=8.494
DRAW=7.225
DRAW=7.128
DRAW=7.935
DRAW=6.729
DRAW=5.475
DRAW=4.689
DRAW=5.009
DRAW=4.611
DRAW=5.931
DRAW=7.139
DRAW=9.541
DRAW=10.703
DRAW=7.765
DRAW=7.267
DRAW=7.239
DRAW=7.167
DRAW=9.034
DRAW=7.914
DRAW=7.213
DRAW=7.613
DRAW=6.505
DRAW=5.718
DRAW=5.375
DRAW=4.998
DRAW=4.993
DRAW=4.645
DRAW=5.163
DRAW=4.433
DRAW=4.064
DRAW=5.087
DRAW=5.144
DRAW=5.102
DRAW=5.390
DRAW=7.013
DRAW=6.438
DRAW=6.533
DRAW=3.951
DRAW=3.917
DRAW=7.246
DRAW=4.765
DRAW=5.639
DRAW=4.697
DRAW=5.732
DRAW=4.225
DRAW=5.623
DRAW=4.907
DRAW=4.927
DRAW=4.231
DRAW=3.948
DRAW=3.938
DRAW=9.705
DRAW=9.649
DRAW=10.631
DRAW=5.089
DRAW=7.347
DRAW=5.065
DRAW=4.645
DRAW=7.197
DRAW=9.322
DRAW=6.247
DRAW=5.416
DRAW=4.383
DRAW=4.045
DRAW=3.557
DRAW=3.884
DRAW=7.362
DRAW=4.647
DRAW=6.039
DRAW=5.091
DRAW=4.711
DRAW=5.160
DRAW=4.749
DRAW=7.169
DRAW=5.313
DRAW=5.256
DRAW=4.254
DRAW=5.629
DRAW=4.723
DRAW=3.479
DRAW=12.710
DRAW=4.994
DRAW=4.599
DRAW=5.153
DRAW=5.038
DRAW=4.641
DRAW=4.677
DRAW=5.199
DRAW=7.867
DRAW=8.758
DRAW=8.418
DRAW=7.201
DRAW=7.219
DRAW=7.586
DRAW=11.247
DRAW=6.114
DRAW=6.289
DRAW=4.708
DRAW=4.024
DRAW=3.539
DRAW=3.473
DRAW=9.318
DRAW=5.495
DRAW=4.714
DRAW=4.716
DRAW=5.507
DRAW=4.645
DRAW=6.456
DRAW=5.502
DRAW=4.630
DRAW=4.732
DRAW=5.414
DRAW=4.644
DRAW=5.028
DRAW=5.443
DRAW=4.684
DRAW=4.765
DRAW=9.478
DRAW=9.397
DRAW=8.258
DRAW=9.148
DRAW=8.664
DRAW=5.592
DRAW=6.054
DRAW=5.416
DRAW=5.943
DRAW=6.441
DRAW=5.392
DRAW=7.117
DRAW=7.852
DRAW=7.163
DRAW=7.869
DRAW=8.221
DRAW=7.964
DRAW=7.083
DRAW=7.167
DRAW=7.125
DRAW=8.137
DRAW=8.252
DRAW=9.975
DRAW=7.051
DRAW=7.335
DRAW=7.185
DRAW=8.165
DRAW=8.066
DRAW=7.246
DRAW=7.158
DRAW=7.226
DRAW=7.184
DRAW=7.032
DRAW=8.249
DRAW=10.333
DRAW=7.085
DRAW=5.474
DRAW=5.425
DRAW=6.116
DRAW=7.703
DRAW=9.134
DRAW=5.433
DRAW=5.168
DRAW=5.089
DRAW=5.989
DRAW=10.250
DRAW=14.946
DRAW=7.326
DRAW=5.102
DRAW=4.573
DRAW=5.083
DRAW=5.506
DRAW=4.659
DRAW=5.504
DRAW=5.082
DRAW=6.527
DRAW=6.063
DRAW=5.404
DRAW=4.708
DRAW=4.928
DRAW=5.195
DRAW=4.725
DRAW=5.818
DRAW=11.028
DRAW=10.174
DRAW=10.441
DRAW=5.303
DRAW=4.610
DRAW=5.477
DRAW=4.849
DRAW=4.973
DRAW=6.829
DRAW=8.735
DRAW=8.213
DRAW=7.098
DRAW=7.575
DRAW=5.438
DRAW=5.984
DRAW=5.783
DRAW=5.424
DRAW=8.081
DRAW=10.256
DRAW=8.136
DRAW=7.776
DRAW=7.798
DRAW=7.800
DRAW=7.814
DRAW=8.461
DRAW=8.230
DRAW=7.742
DRAW=7.918
DRAW=8.309
DRAW=7.135
DRAW=8.407
DRAW=7.774
DRAW=7.211
DRAW=7.892
DRAW=8.476
DRAW=8.556
DRAW=9.703
DRAW=8.738
DRAW=5.545
DRAW=5.753
DRAW=5.436
DRAW=5.480
DRAW=8.568
DRAW=10.694
DRAW=10.471
DRAW=7.222
DRAW=7.207
DRAW=7.782
DRAW=9.046
DRAW=9.411
DRAW=6.311
DRAW=5.403
DRAW=5.695
DRAW=5.392
DRAW=6.703
DRAW=7.236
DRAW=6.805
DRAW=5.497
DRAW=7.956
DRAW=8.198
DRAW=12.781
DRAW=9.482
DRAW=9.811
DRAW=7.937
DRAW=7.699
DRAW=7.984
DRAW=10.067
DRAW=8.895
DRAW=6.398
DRAW=5.767
DRAW=5.468
DRAW=7.190
DRAW=7.248
DRAW=6.672
DRAW=5.754
DRAW=5.475
DRAW=5.663
DRAW=8.057
DRAW=9.519
DRAW=7.945
DRAW=7.242
DRAW=7.667
DRAW=7.092
DRAW=7.365
DRAW=8.537
DRAW=8.044
DRAW=7.195
DRAW=7.683
DRAW=5.695
DRAW=5.593
DRAW=5.362
DRAW=5.598
DRAW=6.388
DRAW=7.455
DRAW=5.419
DRAW=5.243
DRAW=6.539
DRAW=3.739
DRAW=3.422
DRAW=3.476
DRAW=4.685
DRAW=4.711
DRAW=4.813
DRAW=8.567
DRAW=9.579
DRAW=9.315
DRAW=9.188
DRAW=9.252
DRAW=5.608
DRAW=4.742
DRAW=4.772
DRAW=4.598
DRAW=4.974
DRAW=4.684
DRAW=5.852
DRAW=11.640
DRAW=15.863
DRAW=6.278
DRAW=4.722
DRAW=3.934
DRAW=3.882
DRAW=3.557
DRAW=3.548
DRAW=3.547
DRAW=3.585
DRAW=8.088
DRAW=10.029
DRAW=8.817
DRAW=8.027
DRAW=5.308
DRAW=7.189
DRAW=5.404
DRAW=6.529
DRAW=6.852
DRAW=9.507
DRAW=8.163
DRAW=7.498
DRAW=7.106
DRAW=9.044
DRAW=8.556
DRAW=7.391
DRAW=6.968
DRAW=7.912
DRAW=5.400
DRAW=6.492
DRAW=5.379
DRAW=7.640
DRAW=5.306
DRAW=5.579
DRAW=5.376
DRAW=6.493
DRAW=6.903
DRAW=5.308
DRAW=6.208
DRAW=6.063
DRAW=5.413
DRAW=6.913
DRAW=9.441
DRAW=15.098
DRAW=11.997
DRAW=6.877
DRAW=7.030
DRAW=6.890
DRAW=7.147
DRAW=8.894
DRAW=7.072
DRAW=5.275
DRAW=4.902
DRAW=6.259
DRAW=8.683
DRAW=10.586
DRAW=8.984
DRAW=9.514
DRAW=7.332
DRAW=8.118
DRAW=7.388
DRAW=7.004
DRAW=6.927
DRAW=7.107
DRAW=7.407
DRAW=7.279
DRAW=7.353
DRAW=7.180
DRAW=7.047
DRAW=7.936
DRAW=7.131
DRAW=8.316
DRAW=8.652
DRAW=7.197
DRAW=6.962
DRAW=7.917
DRAW=8.789
DRAW=7.683
DRAW=7.687
DRAW=7.110
DRAW=6.961
DRAW=7.484
DRAW=7.053
DRAW=7.611
DRAW=8.402
DRAW=7.110
DRAW=6.952
DRAW=7.766
DRAW=9.313
DRAW=7.276
DRAW=7.346
DRAW=8.409
DRAW=7.018
DRAW=7.589
DRAW=7.413
DRAW=7.242
DRAW=7.429
DRAW=7.092
DRAW=6.987
DRAW=7.027
DRAW=7.570
DRAW=8.485
DRAW=9.606
DRAW=9.305
DRAW=6.438
DRAW=6.444
DRAW=4.534
DRAW=6.062
DRAW=4.513
DRAW=9.083
DRAW=7.577
DRAW=6.954
DRAW=5.301
DRAW=10.694
DRAW=6.305
DRAW=5.546
DRAW=5.368
DRAW=5.808
DRAW=5.309
DRAW=6.229
DRAW=6.574
DRAW=5.426
DRAW=6.131
DRAW=5.759
DRAW=9.144
DRAW=7.256
DRAW=7.761
DRAW=5.311
DRAW=5.583
DRAW=9.606
DRAW=7.724
DRAW=8.321
DRAW=8.244
DRAW=7.160
DRAW=7.412
DRAW=7.472
DRAW=7.115
DRAW=9.499
DRAW=8.285
DRAW=6.939
DRAW=7.101
DRAW=7.031
DRAW=7.112
DRAW=6.966
DRAW=7.895
DRAW=7.000
DRAW=6.984
DRAW=7.063
DRAW=6.913
DRAW=10.527
DRAW=7.616
DRAW=5.287
DRAW=5.459
DRAW=6.676
DRAW=9.213
DRAW=8.389
DRAW=8.781
DRAW=8.793
DRAW=7.668
DRAW=7.740
DRAW=7.930
DRAW=8.677
DRAW=8.376
DRAW=7.979
DRAW=7.079
DRAW=7.037
DRAW=6.952
DRAW=12.348
DRAW=10.556
DRAW=21.856
DRAW=5.769
DRAW=2.739
DRAW=5.701
DRAW=2.638
DRAW=2.961
DRAW=2.976
DRAW=2.618
DRAW=3.265
DRAW=8.430
DRAW=4.295
DRAW=3.207
DRAW=2.655
DRAW=2.569
DRAW=2.770
DRAW=2.719
DRAW=3.460
DRAW=3.948
DRAW=3.413
DRAW=3.613
DRAW=7.778
DRAW=5.982
DRAW=4.565
DRAW=4.554
DRAW=4.190
DRAW=3.122
DRAW=7.212
DRAW=3.987
DRAW=3.622
DRAW=3.577
DRAW=6.021
DRAW=5.799
DRAW=5.793
DRAW=4.166
DRAW=3.946
DRAW=4.048
DRAW=3.719
DRAW=2.803
DRAW=4.054
DRAW=4.582
DRAW=3.800
DRAW=5.491
DRAW=4.747
DRAW=4.804
DRAW=9.434
DRAW=10.367
DRAW=9.756
DRAW=9.485
DRAW=7.847
DRAW=7.668
DRAW=7.596
DRAW=9.655
DRAW=8.080
DRAW=6.924
DRAW=4.598
DRAW=4.602
DRAW=8.330
DRAW=5.688
DRAW=10.471
DRAW=9.282
DRAW=7.709
DRAW=6.935
DRAW=7.149
DRAW=7.031
DRAW=8.012
DRAW=7.982
DRAW=7.939
DRAW=6.985
DRAW=7.046
DRAW=7.214
DRAW=8.363
DRAW=7.670
DRAW=7.614
DRAW=7.630
DRAW=7.815
DRAW=7.064
DRAW=8.147
DRAW=7.192
DRAW=6.972
DRAW=7.006
DRAW=7.080
DRAW=7.954
DRAW=7.868
DRAW=5.366
DRAW=5.442
DRAW=5.307
DRAW=8.317
DRAW=5.436
DRAW=5.984
DRAW=9.802
DRAW=8.603
DRAW=9.151
DRAW=8.332
DRAW=7.980
DRAW=8.256
DRAW=8.644
DRAW=9.396
DRAW=8.096
DRAW=7.953
DRAW=7.821
DRAW=7.688
DRAW=10.240
DRAW=7.086
DRAW=5.298
DRAW=7.923
DRAW=5.489
DRAW=10.246
DRAW=9.515
DRAW=7.843
DRAW=6.935
DRAW=7.056
DRAW=7.334
DRAW=8.074
DRAW=7.705
DRAW=6.950
DRAW=5.151
DRAW=4.875
DRAW=4.720
DRAW=3.779
DRAW=4.038
DRAW=4.017
DRAW=6.221
DRAW=4.085
DRAW=4.496
DRAW=6.912
DRAW=7.116
DRAW=7.200
DRAW=7.119
DRAW=6.999
DRAW=8.221
DRAW=9.150
DRAW=9.745
DRAW=7.690
DRAW=7.526
DRAW=8.030
DRAW=10.167
DRAW=25.911
DRAW=13.105
DRAW=12.064
DRAW=10.293
DRAW=8.715
DRAW=9.348
DRAW=13.314
DRAW=5.538
DRAW=6.109
DRAW=5.369
DRAW=5.496
DRAW=5.057
DRAW=5.753
DRAW=9.807
DRAW=10.278
DRAW=10.250
DRAW=5.391
DRAW=5.326
DRAW=5.209
DRAW=5.234
DRAW=7.272
DRAW=7.152
DRAW=7.199
DRAW=7.344
DRAW=7.382
DRAW=7.798
DRAW=7.133
DRAW=7.051
DRAW=7.200
DRAW=8.076
DRAW=7.967
DRAW=8.087
DRAW=7.131
DRAW=7.188
DRAW=7.041
DRAW=8.260
DRAW=8.256
DRAW=8.259
DRAW=12.337
DRAW=7.710
DRAW=6.154
DRAW=5.048
DRAW=5.380
DRAW=7.035
DRAW=10.306
DRAW=7.105
DRAW=7.222
DRAW=7.348
DRAW=7.857
DRAW=8.046
DRAW=7.477
DRAW=9.763
DRAW=7.340
DRAW=7.185
DRAW=7.733
DRAW=7.649
DRAW=7.160
DRAW=11.119
DRAW=16.537
DRAW=5.901
DRAW=4.646
** Activity (main) Pause, UserClosed = false **
DRAW=3.781
paused
sensor listener tear down

using the same code in a different sub (that will give the same result) will take much less time:

DRAW=0.407
DRAW=0.382
DRAW=0.404
DRAW=0.491
DRAW=0.539
DRAW=0.412
DRAW=0.460
DRAW=0.415
DRAW=0.451
DRAW=0.468
DRAW=0.426
DRAW=0.481
DRAW=0.377
DRAW=0.436
DRAW=0.400
DRAW=0.401
DRAW=0.421
DRAW=0.359
DRAW=0.384
DRAW=0.435
DRAW=0.468
DRAW=0.421
DRAW=0.938
DRAW=0.401
DRAW=0.419
DRAW=0.411
DRAW=0.448
DRAW=0.435
DRAW=0.389
DRAW=0.412
DRAW=0.412
DRAW=0.428
DRAW=0.400
DRAW=0.538
DRAW=0.418
DRAW=0.407
DRAW=0.433
DRAW=0.421
DRAW=0.407
DRAW=0.420
DRAW=0.446
DRAW=0.518
DRAW=0.427
DRAW=0.480
DRAW=0.403
DRAW=0.444
DRAW=0.489
DRAW=0.406
DRAW=0.448
DRAW=0.373
DRAW=0.407
DRAW=0.455
DRAW=0.530
DRAW=0.403
DRAW=0.374
DRAW=0.409
DRAW=0.411
DRAW=0.409
DRAW=0.606
DRAW=0.412
DRAW=0.431
DRAW=0.616
DRAW=0.406
DRAW=0.465
DRAW=0.401
DRAW=0.394
DRAW=0.402
DRAW=0.427
DRAW=1.336
DRAW=0.460
DRAW=0.391
DRAW=0.405
DRAW=0.431
DRAW=0.407
DRAW=0.453
DRAW=0.442
DRAW=0.422
DRAW=0.452
DRAW=0.485
DRAW=0.416
DRAW=0.504
DRAW=0.430
DRAW=0.452
DRAW=0.513
DRAW=0.457
DRAW=0.494
DRAW=0.458
DRAW=0.404
DRAW=0.483
DRAW=0.489
DRAW=0.423
DRAW=0.433
DRAW=0.403
DRAW=0.743
DRAW=0.419
DRAW=0.415
DRAW=0.403
DRAW=0.442
DRAW=0.398
DRAW=0.417
DRAW=0.401
DRAW=0.410
DRAW=0.491
DRAW=0.420
DRAW=0.453
DRAW=0.407
DRAW=0.407
DRAW=0.427
DRAW=0.426
DRAW=0.532
DRAW=0.407
DRAW=0.399
DRAW=0.418
DRAW=0.407
DRAW=0.418
DRAW=0.462
DRAW=0.425
DRAW=0.418
DRAW=0.393
DRAW=0.526
DRAW=0.630
DRAW=0.439
DRAW=0.437
DRAW=0.438
DRAW=0.421
DRAW=0.557
DRAW=0.422
DRAW=0.426
DRAW=0.435
DRAW=0.366
DRAW=0.407
DRAW=0.408
DRAW=0.414
DRAW=0.434
DRAW=0.535
DRAW=0.417
DRAW=0.409
DRAW=0.427
DRAW=0.452
DRAW=0.426
DRAW=0.459
DRAW=0.447
DRAW=0.423
DRAW=0.434
DRAW=0.412
DRAW=0.384
DRAW=0.404
DRAW=0.418
DRAW=0.509
DRAW=0.464
DRAW=0.376
DRAW=0.412
DRAW=0.450
DRAW=0.423
DRAW=0.429
DRAW=0.394
DRAW=0.427
DRAW=0.466
DRAW=0.453
DRAW=0.430
DRAW=0.412
DRAW=0.433
DRAW=0.415
DRAW=0.424
DRAW=0.435
DRAW=0.399
DRAW=0.374
DRAW=0.410
DRAW=0.405
DRAW=0.463
DRAW=0.422
DRAW=0.423
DRAW=0.417
DRAW=0.469
DRAW=0.442
DRAW=0.429
DRAW=0.404
DRAW=0.388
DRAW=0.384
DRAW=0.373
DRAW=0.493
DRAW=0.474
DRAW=0.471
DRAW=0.431
DRAW=0.522
DRAW=0.920
DRAW=0.437
DRAW=0.443
DRAW=0.435
DRAW=0.449
DRAW=0.433
DRAW=0.466
DRAW=0.373
DRAW=0.402
DRAW=0.414
DRAW=0.412
DRAW=0.416
DRAW=0.389
DRAW=0.391
DRAW=0.405
DRAW=0.423
DRAW=0.400
DRAW=0.395
DRAW=0.383
DRAW=0.403
DRAW=0.450
DRAW=0.399
DRAW=0.419
DRAW=0.537
DRAW=0.443
DRAW=0.511
DRAW=0.423
DRAW=0.453
DRAW=0.400
DRAW=0.413
DRAW=0.437
DRAW=0.444
DRAW=0.418
DRAW=0.413
DRAW=0.792
DRAW=0.444
DRAW=0.431
DRAW=0.401
DRAW=0.596
DRAW=0.389
DRAW=0.429
DRAW=0.862
DRAW=0.428
DRAW=0.421
DRAW=0.410
DRAW=0.507
DRAW=0.457
DRAW=0.409
DRAW=0.430
DRAW=0.413
DRAW=0.414
DRAW=0.417
DRAW=0.406
DRAW=0.470
DRAW=0.432
DRAW=0.376
DRAW=0.426
DRAW=0.414
DRAW=0.396
DRAW=0.928
DRAW=0.491
DRAW=0.420
DRAW=0.432
DRAW=0.515
DRAW=0.445
DRAW=0.477
DRAW=0.474
DRAW=0.454
DRAW=0.445
DRAW=0.413
DRAW=0.460
DRAW=0.379
DRAW=0.398
DRAW=0.404
DRAW=0.449
DRAW=0.438
DRAW=0.426
DRAW=0.406
DRAW=0.400
DRAW=0.436
DRAW=0.535
DRAW=0.415
DRAW=0.415
DRAW=0.706
DRAW=0.415
DRAW=0.414
DRAW=0.518
DRAW=0.382
DRAW=0.421
DRAW=0.400
DRAW=0.408
DRAW=0.403
DRAW=0.455
DRAW=0.421
DRAW=0.422
DRAW=0.476
DRAW=0.413
DRAW=0.403
DRAW=0.460
DRAW=0.409
DRAW=0.446
DRAW=0.424
DRAW=0.410
DRAW=0.412
DRAW=0.412
DRAW=0.401
DRAW=1.126
DRAW=0.456
DRAW=0.398
DRAW=0.404
DRAW=0.389
DRAW=0.424
DRAW=0.428
DRAW=0.447
DRAW=0.436
DRAW=0.443
DRAW=0.426
DRAW=0.534
DRAW=0.491
DRAW=0.462
DRAW=0.481
DRAW=0.422
DRAW=0.468
DRAW=0.433
DRAW=0.377
DRAW=0.404
DRAW=0.400
DRAW=0.452
DRAW=0.402
DRAW=0.458
DRAW=0.571
DRAW=0.455
DRAW=0.459
DRAW=0.573
DRAW=0.450
DRAW=0.457
DRAW=0.408
DRAW=0.408
DRAW=0.403
DRAW=0.408
DRAW=0.384
DRAW=0.480
DRAW=0.467
DRAW=0.401
DRAW=0.439
DRAW=0.433
DRAW=0.461
DRAW=0.462
DRAW=0.646
DRAW=0.450
DRAW=0.570
DRAW=0.485
DRAW=0.450
DRAW=0.429
DRAW=0.417
DRAW=0.715
DRAW=0.402
DRAW=0.443
DRAW=0.402
DRAW=0.503
DRAW=0.462
DRAW=0.421
DRAW=0.449
DRAW=0.405
DRAW=0.435
DRAW=1.346
DRAW=0.436
DRAW=1.531
DRAW=0.582
DRAW=0.462
DRAW=0.480
DRAW=0.415
DRAW=0.509
DRAW=0.425
DRAW=0.439
DRAW=1.327
DRAW=0.530
DRAW=0.432
DRAW=0.471
DRAW=0.434
DRAW=0.424
DRAW=0.445
DRAW=0.415
DRAW=0.412
DRAW=0.425
DRAW=0.426
DRAW=0.431
DRAW=0.414
DRAW=0.468
DRAW=0.442
DRAW=0.434
DRAW=0.425
DRAW=0.434
DRAW=0.480
DRAW=0.525
DRAW=0.529
DRAW=0.436
DRAW=0.523
DRAW=0.457
DRAW=0.474
DRAW=0.677
DRAW=0.446
DRAW=0.425
DRAW=0.431
DRAW=0.426
DRAW=0.465
DRAW=0.422
DRAW=0.416
DRAW=0.424
DRAW=0.382
DRAW=0.417
DRAW=0.413
DRAW=0.494
DRAW=0.463
DRAW=0.446
DRAW=0.763
DRAW=0.422
DRAW=0.461
DRAW=0.467
DRAW=0.415
DRAW=0.736
DRAW=0.407
DRAW=0.416
DRAW=0.453
DRAW=0.398
DRAW=0.433
DRAW=0.431
DRAW=0.433
DRAW=0.454
DRAW=0.410
DRAW=0.382
DRAW=0.408
DRAW=0.389
DRAW=0.602
DRAW=0.454
DRAW=0.464
DRAW=0.423
DRAW=0.425
DRAW=0.518
DRAW=0.689
DRAW=0.411
DRAW=0.411
DRAW=0.485
DRAW=0.418
DRAW=0.441
DRAW=0.447
DRAW=0.369
DRAW=0.406
DRAW=0.445
DRAW=0.520
DRAW=0.493
DRAW=0.427
DRAW=0.431
DRAW=0.506
DRAW=0.395
DRAW=0.427
DRAW=0.386
DRAW=0.399
DRAW=0.423
DRAW=0.404
DRAW=0.398
DRAW=0.375
DRAW=0.619
DRAW=0.413
DRAW=0.404
DRAW=0.397
DRAW=0.416
DRAW=0.390
DRAW=0.425
DRAW=0.416
DRAW=0.403
DRAW=0.403
DRAW=0.377
DRAW=0.413
DRAW=0.408
DRAW=0.400
DRAW=0.456
DRAW=0.385
DRAW=0.409
DRAW=0.647
DRAW=0.455
DRAW=0.484
DRAW=0.437
DRAW=0.396
DRAW=0.399
DRAW=0.411
DRAW=0.400
DRAW=0.425
DRAW=0.464
DRAW=0.559
DRAW=0.410
DRAW=0.447
DRAW=0.471
DRAW=0.403
DRAW=0.707
DRAW=0.431
DRAW=0.414
DRAW=0.692
DRAW=0.410
DRAW=0.378
DRAW=0.478
DRAW=0.399
DRAW=0.459
DRAW=0.460
DRAW=0.398
DRAW=0.453
DRAW=0.403
DRAW=0.786
DRAW=0.436
DRAW=0.406
DRAW=0.403
DRAW=0.430
DRAW=0.887
DRAW=0.437
DRAW=0.427
DRAW=0.426
DRAW=0.437
DRAW=0.404
DRAW=0.421
DRAW=0.427
DRAW=0.414
DRAW=0.449
DRAW=0.408
DRAW=0.462
DRAW=0.632
DRAW=0.372
DRAW=0.455
DRAW=0.416
DRAW=0.924
DRAW=0.448
DRAW=0.411
DRAW=0.422
DRAW=0.404
DRAW=0.440
DRAW=0.414
DRAW=0.401
DRAW=0.385
DRAW=0.418
DRAW=0.422
DRAW=0.434
DRAW=0.429
DRAW=0.463
DRAW=0.409
DRAW=0.404
DRAW=1.245
DRAW=0.467
DRAW=0.402
DRAW=0.412
DRAW=0.941
DRAW=0.402
DRAW=0.410
DRAW=0.403
DRAW=0.378
DRAW=0.413
DRAW=0.633
DRAW=0.441
DRAW=0.421
DRAW=0.374
DRAW=0.428
DRAW=0.432
DRAW=0.440
DRAW=0.416
DRAW=0.422
DRAW=0.412
DRAW=0.452
DRAW=0.433
DRAW=0.452
DRAW=0.378
DRAW=0.421
DRAW=0.405
DRAW=0.494
DRAW=0.398
DRAW=0.404
DRAW=0.452
DRAW=0.400
DRAW=0.394
DRAW=0.388
DRAW=0.388
DRAW=0.355
DRAW=0.729
DRAW=0.413
DRAW=0.419
DRAW=0.415
DRAW=0.383
DRAW=0.466
DRAW=0.554
DRAW=0.412
DRAW=0.396
DRAW=0.486
DRAW=1.235
DRAW=0.443
DRAW=0.408
DRAW=0.409
DRAW=0.483
DRAW=0.571
DRAW=0.449
DRAW=0.441
DRAW=0.401
DRAW=0.418
DRAW=0.399
DRAW=0.443
DRAW=0.530
DRAW=0.456
DRAW=0.696
DRAW=0.512
DRAW=0.373
DRAW=0.393
DRAW=0.721
DRAW=0.396
DRAW=0.416
DRAW=0.430
DRAW=0.667
DRAW=1.026
DRAW=1.023
DRAW=0.459
DRAW=0.612
DRAW=0.506
DRAW=0.401
DRAW=0.507
DRAW=0.796
DRAW=0.444
DRAW=0.400
DRAW=0.448
DRAW=0.628
DRAW=0.655
DRAW=0.602
DRAW=0.601
DRAW=0.638
DRAW=1.531
DRAW=1.490
DRAW=0.459
DRAW=0.818
DRAW=1.471
DRAW=0.683
DRAW=1.479
DRAW=0.475
DRAW=0.419
DRAW=0.501
DRAW=0.522
DRAW=0.462
DRAW=0.677
DRAW=0.699
DRAW=0.623
DRAW=0.805
DRAW=0.762
DRAW=0.628
DRAW=0.571
DRAW=0.553
DRAW=0.626
DRAW=3.556
DRAW=5.759
DRAW=1.397
DRAW=1.118
DRAW=1.138
DRAW=1.125
DRAW=1.111
DRAW=1.169
DRAW=1.844
DRAW=1.706
DRAW=1.941
DRAW=1.771
DRAW=6.116
DRAW=0.810
DRAW=0.710
DRAW=0.563
DRAW=0.644
DRAW=0.567
DRAW=1.505
DRAW=2.682
DRAW=1.766
DRAW=18.652
DRAW=0.714
DRAW=0.779
DRAW=0.688
DRAW=0.736
DRAW=1.093
DRAW=0.736
DRAW=0.790
DRAW=1.313
DRAW=1.205
DRAW=1.272
DRAW=1.309
DRAW=1.297
DRAW=3.349
DRAW=1.207
DRAW=0.722
DRAW=0.783
DRAW=0.722
DRAW=0.803
DRAW=0.669
DRAW=0.709
DRAW=0.996
DRAW=0.864
DRAW=0.704
DRAW=0.655
DRAW=0.519
DRAW=0.644
DRAW=2.441
DRAW=4.924
DRAW=6.365
DRAW=0.672
DRAW=0.750
DRAW=0.660
DRAW=0.707
DRAW=0.673
DRAW=1.213
DRAW=0.581
DRAW=0.547
DRAW=0.642
DRAW=0.629
DRAW=1.644
DRAW=0.585
DRAW=0.745
DRAW=0.528
DRAW=0.418
DRAW=0.443
DRAW=0.668
DRAW=0.817
DRAW=1.024
DRAW=0.698
DRAW=0.763
DRAW=0.808
DRAW=0.988
DRAW=1.365
DRAW=1.358
DRAW=1.325
DRAW=3.287
DRAW=1.283
DRAW=1.266
DRAW=1.288
DRAW=1.458
DRAW=1.132
DRAW=1.068
DRAW=1.214
DRAW=0.860
DRAW=0.862
DRAW=1.186
DRAW=0.797
DRAW=1.338
DRAW=1.005
DRAW=0.465
DRAW=0.439
DRAW=0.403
DRAW=0.610
DRAW=0.472
DRAW=0.388
DRAW=2.407
DRAW=0.504
DRAW=0.422
DRAW=0.508
DRAW=0.487
DRAW=0.469
DRAW=0.408
DRAW=0.623
DRAW=0.456
DRAW=0.473
DRAW=0.523
DRAW=0.530
DRAW=0.496
DRAW=1.003
DRAW=0.963
DRAW=0.817
DRAW=2.684
DRAW=0.759
DRAW=0.971
DRAW=0.792
DRAW=0.775
DRAW=1.280
DRAW=1.292
DRAW=1.446
DRAW=1.785
DRAW=1.805
DRAW=1.938
DRAW=1.833
DRAW=1.768
DRAW=4.629
DRAW=2.568
DRAW=1.764
DRAW=1.980
DRAW=1.700
DRAW=1.834
DRAW=1.796
DRAW=1.783
DRAW=2.076
DRAW=1.365
DRAW=0.692
DRAW=0.560
DRAW=0.640
DRAW=0.583
DRAW=2.192
DRAW=0.600
DRAW=0.753
DRAW=0.715
DRAW=2.094
DRAW=1.853
DRAW=1.707
DRAW=4.254
DRAW=2.357
DRAW=1.758
DRAW=1.280
DRAW=2.781
DRAW=0.983
DRAW=0.724
DRAW=0.828
DRAW=1.030
DRAW=1.000
DRAW=3.360
DRAW=2.402
DRAW=5.367
DRAW=1.298
DRAW=1.275
DRAW=1.270
DRAW=1.357
DRAW=0.849
DRAW=0.835
DRAW=0.581
DRAW=0.508
DRAW=0.621
DRAW=1.387
DRAW=1.280
DRAW=2.201
DRAW=2.519
DRAW=0.738
DRAW=0.654
DRAW=0.637
DRAW=0.728
DRAW=0.576
DRAW=0.519
DRAW=0.541
DRAW=1.222
DRAW=1.443
DRAW=0.558
DRAW=0.535
DRAW=2.569
DRAW=1.240
DRAW=0.948
DRAW=0.961
DRAW=0.728
DRAW=0.625
DRAW=0.553
DRAW=0.520
DRAW=0.517
DRAW=1.805
DRAW=3.456
DRAW=2.519
DRAW=1.743
DRAW=1.709
DRAW=1.782
DRAW=1.724
DRAW=3.003
DRAW=1.724
DRAW=1.700
DRAW=1.781
DRAW=1.542
DRAW=0.994
DRAW=1.675
DRAW=0.697
DRAW=0.756
DRAW=0.676
DRAW=0.746
DRAW=1.205
DRAW=2.877
DRAW=1.249
DRAW=1.221
DRAW=2.417
DRAW=2.557
DRAW=2.411
DRAW=2.426
DRAW=3.856
DRAW=2.390
DRAW=2.376
DRAW=2.659
DRAW=1.692
DRAW=2.438
DRAW=1.732
DRAW=1.742
DRAW=2.005
DRAW=1.782
DRAW=1.699
DRAW=3.456
DRAW=1.712
DRAW=1.748
DRAW=1.701
DRAW=1.709
DRAW=1.724
DRAW=3.975
DRAW=2.982
DRAW=1.870
DRAW=2.511
DRAW=1.229
DRAW=1.207
DRAW=2.131
DRAW=1.253
DRAW=1.739
DRAW=3.120
DRAW=1.731
DRAW=2.281
DRAW=3.598
DRAW=2.188
DRAW=1.696
DRAW=1.929
DRAW=1.266
DRAW=1.229
DRAW=1.216
DRAW=2.278
DRAW=1.807
DRAW=2.443
DRAW=1.729
DRAW=1.747
DRAW=1.694
DRAW=1.734
DRAW=1.789
DRAW=1.712
DRAW=0.973
DRAW=0.949
DRAW=0.944
DRAW=0.959
DRAW=1.093
DRAW=3.383
DRAW=0.669
DRAW=1.177
DRAW=0.572
DRAW=0.562
DRAW=0.419
DRAW=0.550
DRAW=0.642
DRAW=0.910
DRAW=0.547
DRAW=0.552
DRAW=0.533
DRAW=0.397
DRAW=0.517
DRAW=0.837
DRAW=0.419
DRAW=0.426
DRAW=0.486
DRAW=0.498
DRAW=0.504
DRAW=0.499
DRAW=0.507
DRAW=0.504
DRAW=0.543
DRAW=0.502
DRAW=0.765
DRAW=2.112
DRAW=0.740
DRAW=1.077
DRAW=1.154
DRAW=1.206
DRAW=1.239
DRAW=2.152
DRAW=1.878
DRAW=1.220
DRAW=1.227
DRAW=1.269
DRAW=1.233
DRAW=1.243
DRAW=1.439
DRAW=1.296
DRAW=1.268
DRAW=1.244
DRAW=1.288
DRAW=1.202
DRAW=1.188
DRAW=1.263
DRAW=1.243
DRAW=1.260
DRAW=1.240
DRAW=1.212
DRAW=1.592
DRAW=1.229
DRAW=1.494
DRAW=1.313
DRAW=1.254
DRAW=1.448
DRAW=1.325
DRAW=1.228
DRAW=1.340
DRAW=1.230
DRAW=1.231
DRAW=1.654
DRAW=1.354
DRAW=1.232
DRAW=1.461
DRAW=1.210
DRAW=1.228
DRAW=1.300
DRAW=1.218
DRAW=1.256
DRAW=1.263
DRAW=1.229
DRAW=1.266
DRAW=1.331
DRAW=1.625
DRAW=1.704
DRAW=1.819
DRAW=2.159
DRAW=1.767
DRAW=1.768
DRAW=3.194
DRAW=1.706
DRAW=1.976
DRAW=1.767
DRAW=1.733
DRAW=1.719
DRAW=1.925
DRAW=2.736
DRAW=2.063
DRAW=1.717
DRAW=2.581
DRAW=1.722
DRAW=2.460
DRAW=1.267
DRAW=1.377
DRAW=1.214
DRAW=1.194
DRAW=1.308
DRAW=2.235
DRAW=1.223
DRAW=1.227
DRAW=1.227
DRAW=1.247
DRAW=1.319
DRAW=1.673
DRAW=1.736
DRAW=2.963
DRAW=1.717
DRAW=1.797
DRAW=1.852
DRAW=1.846
DRAW=1.727
DRAW=1.941
DRAW=1.777
DRAW=1.754
DRAW=1.856
DRAW=3.211
DRAW=1.772
DRAW=2.508
DRAW=2.654
DRAW=2.420
DRAW=2.816
DRAW=1.801
DRAW=1.734
DRAW=1.985
DRAW=5.028
DRAW=1.107
DRAW=1.107
DRAW=7.896
DRAW=3.478
DRAW=0.692
DRAW=0.630
DRAW=0.573
DRAW=0.539
DRAW=0.532
DRAW=0.514
DRAW=0.686
DRAW=0.705
DRAW=0.818
DRAW=0.658
DRAW=1.063
DRAW=1.243
DRAW=1.804
DRAW=1.715
DRAW=2.203
DRAW=1.889
DRAW=1.707
DRAW=1.750
DRAW=1.716
DRAW=1.675
DRAW=1.720
DRAW=12.022
DRAW=1.413
DRAW=1.433
DRAW=0.960
DRAW=0.925
DRAW=1.058
DRAW=1.104
DRAW=2.308
DRAW=1.405
DRAW=0.961
DRAW=0.984
DRAW=0.965
DRAW=1.005
DRAW=1.316
DRAW=1.137
DRAW=1.004
DRAW=0.987
DRAW=1.796
DRAW=1.715
DRAW=1.755
DRAW=1.725
DRAW=1.737
DRAW=1.731
DRAW=1.731
DRAW=1.717
DRAW=1.739
DRAW=1.687
DRAW=1.723
DRAW=1.233
DRAW=1.349
DRAW=1.229
DRAW=1.281
DRAW=1.302
DRAW=1.240
DRAW=1.313
DRAW=1.237
DRAW=1.221
DRAW=1.252
DRAW=1.442
DRAW=1.274
DRAW=1.223
DRAW=1.376
DRAW=1.250
DRAW=1.241
DRAW=1.443
DRAW=1.237
DRAW=1.195
DRAW=1.330
DRAW=1.716
DRAW=1.758
DRAW=1.826
DRAW=1.700
DRAW=1.717
DRAW=1.768
DRAW=1.779
DRAW=1.710
DRAW=8.385
DRAW=1.695
DRAW=1.759
DRAW=1.962
DRAW=1.774
DRAW=4.632
DRAW=2.811
DRAW=1.796
DRAW=1.806
DRAW=2.069
DRAW=1.802
DRAW=1.677
DRAW=2.992
DRAW=1.785
DRAW=1.803
DRAW=1.915
DRAW=1.759
DRAW=1.726
DRAW=2.380
DRAW=1.784
DRAW=1.842
DRAW=1.795
DRAW=1.737
DRAW=1.790
DRAW=1.971
DRAW=1.774
DRAW=1.767
DRAW=1.893
DRAW=1.798
DRAW=2.437
DRAW=2.957
DRAW=1.324
DRAW=1.281
DRAW=1.078
DRAW=1.098
DRAW=1.564
DRAW=1.514
DRAW=0.740
DRAW=0.503
DRAW=0.512
DRAW=0.511
DRAW=0.575
DRAW=0.562
DRAW=0.543
DRAW=0.586
DRAW=0.517
DRAW=0.631
DRAW=0.828
DRAW=0.466
DRAW=0.458
DRAW=0.424
** Activity (main) Pause, UserClosed = false **
DRAW=0.437
paused
sensor listener tear down

when you say:


call a sub is not the same then calling stage.draw? a sub is not also an Event?
from this test i think its better (if i have to call each frame stage.draw because i animate my textures,.) then its better to do it in a own sub and not call stage.draw
correct?

thank you.
You do as you wish. Stage and actors offer mainly convenience. You can do without.
That being said, I'm very surprised by your results for the draw event. You should maybe bring this to the attention of Erel because it seems that the efficiency of his event management suffers a lot on your device. It would be interesting to know why.
a sub is not also an Event?
Events can be raised at any time. So you need to put them in a queue and process them one by one as soon as possible. Calling a sub is just calling a sub. It's a jump to another part of your code.
 

ilan

Expert
Licensed User
Longtime User
That being said, I'm very surprised by your results for the draw event. You should maybe bring this to the attention of Erel because it seems that the efficiency of his event management suffers a lot on your device. It would be interesting to know why.

yes this was my attention, i thought maybe there was a problem in the libgdx lib but it could be as you said something in b4a.

i have a very fast device Galaxsy 5s (Quad-core 2.5 GHz, 2 GB RAM) this is why i was surprised i get such an result. i understand that on different devices the result will be different. i also have no anti virus installed or any clean app so maybe @Erel could take a look at it.

thank you very much for your support @Informatix, it is very much appreciated :)
 

Informatix

Expert
Licensed User
Longtime User
Quick question. :)

I understand that, for vectors, the SHAPETYPE_FILLED property allows a shape to be filled with a certain color.
Is it possible, by any means, to fill such shape with a texture instead?
I don't understand the relationship between vectors and lgShapeRenderer. Anyway, a shape with a texture is a mesh. With the lgMesh class, you do things at the OpenGL level so it's not very easy to use. I have a demo (ShaderProgram_WaterSurface) that uses a lgMesh.
 

wonder

Expert
Licensed User
Longtime User
I don't understand the relationship between vectors and lgShapeRenderer.
A square shape with vertices A, B, C and D can be expressed by a sequence of 4 vectors AB, BC, CD, DA. :)

Anyway, back on topic... So a lgMesh allows me, for example to texture a triangle (or any other kind of polygon), right?
 
Top