pushpender-singh-ap / react-native-scanner

A QR code & Barcode Scanner for React Native Projects. It supports React Native's new Fabric Native architecture and was created in Kotlin and Objective-C.
https://www.npmjs.com/package/@pushpendersingh/react-native-scanner
MIT License
54 stars 10 forks source link

fix: Improve ReactNativeScannerView Start Sequence #22

Closed pushpender-singh-ap closed 5 months ago

pushpender-singh-ap commented 5 months ago

This change introduces a dispatch queue for starting the AVCaptureSession (_session) asynchronously in the ReactNativeScannerView component. By moving the _session.startRunning call to a serial dispatch queue named "session queue", the UI thread is no longer blocked by the session start process, potentially improving the UI responsiveness and performance of the application.