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

Performance and memory leaks #85

Closed
sprzenus opened this issue Sep 24, 2019 · 7 comments
Closed

Performance and memory leaks #85

sprzenus opened this issue Sep 24, 2019 · 7 comments

Comments

@sprzenus
Copy link

After dismissing the view my custom subclass of ScanBaseViewController is leaking. Moreover, after dismissing the view before it loads makes CPU usage be still on ~30% on a real device when I dismiss the view. I think removing memory leaks of the ScanBaseViewController would do the thing

@kingst
Copy link
Collaborator

kingst commented Sep 24, 2019

I think I can see what's going on with the memory leak, I'll take a look at this today.

@kingst
Copy link
Collaborator

kingst commented Sep 24, 2019

I can't seem to reproduce the 30% issue and when I run the library through the memory checker it looks like I'm only leaking two small objects (see screen shot below). Can you help me reproduce what you're seeing?

image

@sprzenus
Copy link
Author

We push our controller on a navigation controller's stack and we leaking the view controller just after poping to the previous view controller. The issue with CPU usage happens when I exit the view before the white view disappears and the camera view appears

@kingst
Copy link
Collaborator

kingst commented Sep 25, 2019

Before I dig in deeper about these issues, why are you subclassing ScanBaseViewController? We have a number of UI customizations that we make available for our ScanViewController, although we don't have documentation for them yet you can see them in use in the example app here.

Are these UI customizations enough for what you're looking to do? If not, what's missing?

@sprzenus
Copy link
Author

Here you are: #74
We work on the same project

@kingst
Copy link
Collaborator

kingst commented Sep 25, 2019

I added everything that he asked for in that issue -- I highly suggest trying to go that route instead of subclassing ScanBaseViewController. We subclass it ourselves for our anti-fraud products, but it's messy and not really designed for general use.

@kingst kingst closed this as completed Jan 29, 2020
@kingst
Copy link
Collaborator

kingst commented Jan 29, 2020

closing this issue, please let us know if this is still a problem

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

2 participants