Excesive timing onResume bc of P3D, resolvable?

Hi, people:

I have my dear app very advanced, but when I minimize or press back and try to open it again, takes like 2 min 36 secs to run again

After deleting files, commenting and print logs for hours I found the solution deleting the P3D, it runs again in seconds / milliseconds, so the long time to reopen have to be because the P3D. But I would like to run in P3D because is cooler…

Is there any thing I can do to minimize the timing without quit the P3D? When I launch the app for first time it takes little time, but “minimizing” and “reopening” it takes too much time. Maybe any trick to make the app not remember It have to use P3D until it have been launched or something…

Here is the logcat from Android Studio:

09-11 10:33:41.503 5526-5526/car.autopia.processinghmi I/SurfaceView: surfaceDestroyed callback +, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}

// HERE IS TRYING TO OPEN AGAIN, I CLICKED JUST FEW SECONDS AFTER IT STOPPED

09-11 10:35:49.400 5526-5535/car.autopia.processinghmi I/System: FinalizerDaemon: finalize objects = 5181

// still waiting

09-11 10:37:57.085 5526-5540/car.autopia.processinghmi D/Surface: Surface::disconnect(this=0x7fa4320c00,api=1)
09-11 10:37:57.087 5526-5540/car.autopia.processinghmi D/GraphicBuffer: unregister, handle(0x7f9f1a0780) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.088 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [-]r_hnd(0x7f9f1a0780), client(28), share_fd(38)
09-11 10:37:57.089 5526-5540/car.autopia.processinghmi D/GraphicBuffer: unregister, handle(0x7f9f1a0a00) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.090 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [-]r_hnd(0x7f9f1a0a00), client(28), share_fd(42)
09-11 10:37:57.090 5526-5540/car.autopia.processinghmi E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f8968f8e0
09-11 10:37:57.090 5526-5540/car.autopia.processinghmi D/mali_winsys: [MALI] win=0xa4320c10, native_buffer=0x896be610, fd=-1
09-11 10:37:57.090 5526-5540/car.autopia.processinghmi D/GraphicBuffer: unregister, handle(0x7f8968f8e0) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.091 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [-]r_hnd(0x7f8968f8e0), client(28), share_fd(44)
09-11 10:37:57.092 5526-5540/car.autopia.processinghmi D/Surface: Surface::disconnect(this=0x7fa4320c00,api=1)
09-11 10:37:57.097 5526-5526/car.autopia.processinghmi I/SurfaceView: surfaceDestroyed callback -, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.099 5526-5541/car.autopia.processinghmi D/Surface: Surface::disconnect(this=0x7fa431f000,api=1)
09-11 10:37:57.101 5526-5541/car.autopia.processinghmi D/GraphicBuffer: unregister, handle(0x7fa3bd7dc0) (w:1200 h:1920 s:1200 f:0x1 u:0x000b00)
09-11 10:37:57.101 5526-5541/car.autopia.processinghmi I/[MALI][Gralloc]: [-]r_hnd(0x7fa3bd7dc0), client(28), share_fd(39)
09-11 10:37:57.102 5526-5541/car.autopia.processinghmi D/GraphicBuffer: unregister, handle(0x7f9abd9560) (w:1200 h:1920 s:1200 f:0x1 u:0x000b00)
09-11 10:37:57.102 5526-5541/car.autopia.processinghmi I/[MALI][Gralloc]: [-]r_hnd(0x7f9abd9560), client(28), share_fd(40)
09-11 10:37:57.103 5526-5541/car.autopia.processinghmi D/Surface: Surface::disconnect(this=0x7fa431f000,api=1)
09-11 10:37:57.106 5526-5526/car.autopia.processinghmi I/SurfaceView: updateWindow -- OnPreDrawListener, mHaveFrame = true, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.109 5526-5526/car.autopia.processinghmi D/ActivityThread: ACT-AM_ON_RESUME_CALLED ActivityRecord{d3a2cf0 token=android.os.BinderProxy@d167269 {car.autopia.processinghmi/car.autopia.processinghmi.HMI}}
09-11 10:37:57.110 5526-5526/car.autopia.processinghmi D/ActivityThread: ACT-RESUME_ACTIVITY handled : 1 / android.os.BinderProxy@d167269
09-11 10:37:57.111 5526-5526/car.autopia.processinghmi W/InputMethodManager: startInputInner : InputBindResult == null
09-11 10:37:57.112 5526-5526/car.autopia.processinghmi I/SurfaceView: updateWindow -- onWindowVisibilityChanged, visibility = 0, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    Changes: creating=false format=false size=false visible=true left=false top=false mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=false mVisible=false mRequestedVisible=true, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    Cur surface: Surface(name=null)/@0xb6dd802, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.123 5526-5526/car.autopia.processinghmi I/SurfaceView: New surface: Surface(name=null)/@0x921c513, vis=true, frame=Rect(0, 36 - 1920, 1128), this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    Callback --> surfaceCreated, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    surfaceCreated callback +, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.123 5526-5540/car.autopia.processinghmi D/Surface: Surface::connect(this=0x7fa431f000,api=1)
09-11 10:37:57.124 5526-5540/car.autopia.processinghmi W/libEGL: [ANDROID_RECORDABLE] format: 2
09-11 10:37:57.124 5526-5526/car.autopia.processinghmi I/SurfaceView: surfaceCreated callback -, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    surfaceChanged -- format=4 w=1920 h=1092, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    surfaceChanged callback +, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.124 5526-5540/car.autopia.processinghmi D/mali_winsys: new_window_surface returns 0x3000
09-11 10:37:57.131 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [+]r_hnd(0x7f8968f8e0), client(28), share_fd(38)
09-11 10:37:57.131 5526-5540/car.autopia.processinghmi D/GraphicBuffer: register, handle(0x7f8968f8e0) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.156 5526-5540/car.autopia.processinghmi D/Surface: Surface::disconnect(this=0x7fa431f000,api=1)
09-11 10:37:57.156 5526-5526/car.autopia.processinghmi I/SurfaceView: surfaceChanged callback -, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    surfaceRedrawNeeded, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    finishedDrawing, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.161 5526-5540/car.autopia.processinghmi D/GraphicBuffer: unregister, handle(0x7f8968f8e0) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.161 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [-]r_hnd(0x7f8968f8e0), client(28), share_fd(38)
09-11 10:37:57.162 5526-5540/car.autopia.processinghmi D/Surface: Surface::disconnect(this=0x7fa431f000,api=1)
09-11 10:37:57.164 5526-5540/car.autopia.processinghmi D/Surface: Surface::connect(this=0x7fa431f000,api=1)
09-11 10:37:57.165 5526-5540/car.autopia.processinghmi W/libEGL: [ANDROID_RECORDABLE] format: 2
09-11 10:37:57.168 5526-5540/car.autopia.processinghmi D/mali_winsys: new_window_surface returns 0x3000
09-11 10:37:57.170 5526-5541/car.autopia.processinghmi D/OpenGLRenderer: CanvasContext() 0x7f8dd8c800 initialize window=0x7f8c0af410, title=car.autopia.processinghmi/car.autopia.processinghmi.HMI
09-11 10:37:57.170 5526-5541/car.autopia.processinghmi D/Surface: Surface::connect(this=0x7f8c0af400,api=1)
09-11 10:37:57.171 5526-5541/car.autopia.processinghmi W/libEGL: [ANDROID_RECORDABLE] format: 1
09-11 10:37:57.172 5526-5541/car.autopia.processinghmi D/mali_winsys: new_window_surface returns 0x3000
09-11 10:37:57.172 5526-5526/car.autopia.processinghmi I/SurfaceView: updateWindow -- OnPreDrawListener, mHaveFrame = true, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.176 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [+]r_hnd(0x7f8968f8e0), client(28), share_fd(39)
09-11 10:37:57.176 5526-5540/car.autopia.processinghmi D/GraphicBuffer: register, handle(0x7f8968f8e0) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.184 5526-5526/car.autopia.processinghmi I/SurfaceView: updateWindow -- OnPreDrawListener, mHaveFrame = true, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
    Punch a hole(dispatchDraw), w = 1920, h = 1092, this = processing.opengl.PSurfaceGLES$SurfaceViewGLES{9a8a538 VFE...... .F...... 0,0-1920,1092}
09-11 10:37:57.189 5526-5541/car.autopia.processinghmi I/[MALI][Gralloc]: [+]r_hnd(0x7f9abd9560), client(28), share_fd(41)
09-11 10:37:57.189 5526-5541/car.autopia.processinghmi D/GraphicBuffer: register, handle(0x7f9abd9560) (w:1200 h:1920 s:1200 f:0x1 u:0x000b00)
09-11 10:37:57.212 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [+]r_hnd(0x7f9f1a0a00), client(28), share_fd(43)
09-11 10:37:57.212 5526-5540/car.autopia.processinghmi D/GraphicBuffer: register, handle(0x7f9f1a0a00) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:37:57.251 5526-5535/car.autopia.processinghmi I/System: FinalizerDaemon: finalize objects = 6

// IMAGE LOADED BUT NOT RUNING

09-11 10:38:16.291 5526-5535/car.autopia.processinghmi I/System: FinalizerDaemon: finalize objects = 7
09-11 10:38:16.459 5526-5540/car.autopia.processinghmi D/MALI: gles_state_set_error_internal:63: GLES ctx: 0x7f8c000008, error code:0x500
    gles_state_set_error_internal:64: GLES error info:<pname> is not an accepted value

09-11 10:38:16.711 5526-5540/car.autopia.processinghmi I/[MALI][Gralloc]: [+]r_hnd(0x7f89015320), client(28), share_fd(44)
09-11 10:38:16.711 5526-5540/car.autopia.processinghmi D/GraphicBuffer: register, handle(0x7f89015320) (w:1092 h:1920 s:1104 f:0x2 u:0x000b00)
09-11 10:38:18.088 5526-5526/car.autopia.processinghmi D/ActivityThread: ACT-AM_ON_PAUSE_CALLED ActivityRecord{d3a2cf0 token=android.os.BinderProxy@d167269 {car.autopia.processinghmi/car.autopia.processinghmi.HMI}}
    ACT-PAUSE_ACTIVITY handled : 3 / android.os.BinderProxy@d167269

// AND THE REST I THINK IS NOT USEFULL BUT THE APP RUNS AGAIN

Im using a tablet Aquaris M10 4G

This time it took nearly 5 mins :sweat_smile:, sorry for put the logcat in brute, but I really don’t know what can be relevant or not

Thank you so much for your time :heart:, I see this kind of information I get sick; hope someone can understand it.

Hope too not to have provided enough information to be hacked xD, I will delete the logcat in the future, don’t know if those numbers “5526-5540” are relevant but I let them just in case…