Android Question The application may be doing too much work on its main thread. Say Again?!

trepdas

Active Member
Licensed User
Hello good people,

as my code grew (and it did) , I created all subs in the main page.

when unfiltering the log, I see this (in grey)

Skipped 99 frames! The application may be doing too much work on its main thread.

what would be the best way to solve this?
split the code into classes?
recreate the project into b4xpages? (which I tend very much to do but have block of fear from the binaryc God)
 

trepdas

Active Member
Licensed User
No. the app doesn't freeze.

it happens when I try to send an image from the user's phone gallery to the app, using activity_resume

the pic (bmp) is sent to be scanned and anazlized with google vision lib. (ocr)
also , get this message that "Class com.google.android.gms.vision.Detector failed lock verification and will run slower."

partial log
log:
ResTable_typeSpec entry count inconsistent: given 67, previously 69
ResTable_typeSpec entry count inconsistent: given 5486, previously 5487
Unsupported class loader
Skipping duplicate class check due to unsupported classloader
start_ocr_856638336_langid.cc:33 StartOcr with label: latin_script_gmvapi_android
jni_helper.cc:118 Loading model config /data/user/0/eyetag.ttg/cache/vision/ocr/data/models/semanticlift_rpn_lstm_engine_tfmini.bincfg
region_proposal_text_detector.cc:2137 Compute manager Max in flight region detector: 1
common_util.h:39 Removing Thread Pool: ocr_region
tensor_detector_client.cc:1785 Compute manager Max in flight detector: 1
common_util.h:35 Resizing Thread Pool: ocr_det to 4
tfmini_model_interface.cc:125 Loaded weights from /data/user/0/eyetag.ttg/cache/vision/ocr/data/models/tfmini_rpn_detector_space_to_depth_gray_quantized_v2_model.data
timer.cc:71 PhotoOcrEngine::Init (detector): 3.43615 ms (elapsed)
assist_recognizer.cc:96 Initializing nugget matcher with /data/user/0/eyetag.ttg/cache/vision/ocr/data/models/nugget_stats_1.0.dat
timer.cc:71 PhotoOcrEngine::Init (assist recognizer): 0.890269 ms (elapsed)
timer.cc:71 LanguageIdMutator: 3.46165 ms (elapsed)
timer.cc:71 BeamSearch::Init (mutator): 3.60673 ms (elapsed)
common_util.h:35 Resizing Thread Pool: ocr_segm to 4
tfmini_model_interface.cc:103 Loaded fp16 weights from /data/user/0/eyetag.ttg/cache/vision/ocr/data/models/tfmini_latin_conv_model.data_fp16
tfmini_model_interface.cc:103 Loaded fp16 weights from /data/user/0/eyetag.ttg/cache/vision/ocr/data/models/tfmini_latin_lstm_model.data_fp16
timer.cc:71 PhotoOcrEngine::Init (recognizer): 14.8147 ms (elapsed)
timer.cc:71 Init: 19.3628 ms (elapsed)
start_ocr_856638336_langid.cc:42 StartOcr success
Class com.google.android.gms.vision.Detector failed lock verification and will run slower.
Skipped 106 frames!  The application may be doing too much work on its main thread.
MSG_WINDOW_FOCUS_CHANGED 0
eglDestroySurface = 0xe360da38, 0xcc876000
Relayout returned: old=[18,524][702,756] new=[18,524][702,756] result=0x5 surface={valid=false 0} changed=true
 
Last edited:
Upvote 0
Top