newlogic / smartscanner-core

ID scanning Android app and library. Supports MRZ, NFC, Barcodes, and ID PASS Lite cards.
Apache License 2.0
70 stars 19 forks source link

Crashing or slow in MRZ + NFC scanner #139

Open nicholemnl opened 1 year ago

nicholemnl commented 1 year ago

Current Behaviour

The library is having issues like slowness or even app crash when using MRZ + NFC Scanner

Expected Behaviour

When importing this library on the other projects it should not experience any slowness/delay/lag in reading. As much as possible it will avoid in crash

Steps to Reproduce the Problem

  1. Happens when using NFC and MRZ
  2. Sometimes it will get slow to read. Then suddenly MRZ stops working

Current solution :

Context

nicholemnl commented 1 year ago

image (10)

nicholemnl commented 1 year ago

Run some several tests with a fresh clean ionic project and use Smartscanner capacitor and these are the result with MRZ scanning :

Screen Shot 2023-02-16 at 10 52 27 AM Screen Shot 2023-02-16 at 10 52 57 AM

So from this, we can observe that there is no gradually increasing of memory/processor every scan with MRZ.

nicholemnl commented 1 year ago

Profiling with NFC scanner, result no abnormality in Memory/CPU

Screen Shot 2023-02-16 at 5 17 24 PM
ccerdaz commented 1 year ago

This issue is related to this one.

I hope someone can fix it.

nicholemnl commented 1 year ago

@ccerdaz are you experiencing this issue? can you give me the version of your google play service?

ccerdaz commented 1 year ago

My Google Play Services?, I honestly had no idea that this was relevant... could you explain why it is?

Anyway, my version is 23.04.13

nicholemnl commented 1 year ago

@ccerdaz sorry yeah i think the google play service version does not affect anything. Thought it might be related from this https://github.com/googlesamples/mlkit/issues/236 but it does not make sense because i got a lower version of google play services compared to yours but i was not able to reproduce this issue:

Though this issue might be related to this https://github.com/newlogic/smartscanner-capacitor/issues/22#issuecomment-1438193571