Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow first load #26

Closed
RobertSasak opened this issue Nov 20, 2017 · 6 comments
Closed

Slow first load #26

RobertSasak opened this issue Nov 20, 2017 · 6 comments

Comments

@RobertSasak
Copy link
Owner

It takes around 8s before component show for the first time on iOS. UI thread is frozen and after 8 seconds camera show on the screen. Any following showing/hiding camera is very fast.
Has anybody else similar issue?

@RassaLibre
Copy link

I am having the same issue. I just show a spinner underneath...

@RobertSasak
Copy link
Owner Author

Me too. I also show a spinner for now. I look into the code but I could not figure out what is taking so long.

@bcalik
Copy link

bcalik commented May 2, 2018

Does anyone have a solution please?

@RobertSasak
Copy link
Owner Author

No, I am sorry. I tried to localised the issue, but no luck so far. I am using spinner as a workaround.

@mike-at-tiffik
Copy link
Contributor

I managed to get around this forcing '[self.session startRunning]' to run in the main queue. This can be found in the startSession method in the ALPRCameraManager.mm file. As this seems like a threading issue use at your own discretion.

screen shot 2018-09-21 at 13 28 32

@RobertSasak
Copy link
Owner Author

Nice. Well done @mike-at-tiffik . Since it is just three lines of code, can you please submit a PR?

mike-at-tiffik added a commit to mike-at-tiffik/react-native-openalpr that referenced this issue Sep 21, 2018
…s run on the main thread to speed up initial launch ( Resolves issue RobertSasak#26 )
RobertSasak added a commit that referenced this issue Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants