ideacreation / react-native-barcodescanner

A barcode scanner component for react native - not maintained anymore - use react-native-camera
MIT License
537 stars 162 forks source link

Implement AsyncTask for heavy computation to unblock UI thread #55

Open AlexSchwabauer opened 7 years ago

AlexSchwabauer commented 7 years ago

I found that the bottleneck of this module is the barcode detection logic which is done on each frame. Unfortunately, this computation is quite expensive and blocks the UI and leads to bad performance. This pull request wraps the logic of BarcodeScannerView.onPreviewFrame in an AsyncTask to free the UI thread.

ackdav commented 7 years ago

c0b41 commented 7 years ago

👍

chirag04 commented 7 years ago

@andreaskeller Barcode scanning on android is added to react-native-camera now. It's worth joining hands with react-native-camera or adding in ios support here and claim barcode scanning only module.