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

Investigate performance effects of current structure #18

Open
ES-Alexander opened this issue Oct 15, 2021 · 1 comment
Open

Investigate performance effects of current structure #18

ES-Alexander opened this issue Oct 15, 2021 · 1 comment
Labels
question Further information is requested

Comments

@ES-Alexander
Copy link
Owner

ES-Alexander commented Oct 15, 2021

Motivation:

Every convenience comes at a cost, but quantifying the cost makes it possible to determine whether it's "too expensive".

Suggested Method

Currently use a combination of inheritance and composition, which make modification and new base classes really simple to implement and use, but may come at a performance cost. Would be good to quantify the difference between the current situation and e.g. the 'best-case' performance of VideoReader, LockedCamera, and LockedScreen being implemented with cv2.VideoCapture as their direct parent class.

Possible Resulting Changes

If performance difference is significant, it may be worth

  • making a code-generator that can trade off some program memory for the benefit of fewer function calls at each step
  • changing code structure (hard to recommend - very versatile at the moment, and repetition is a 'bad smell')
  • recommending this library for rapid development, and more optimised code once development is complete (e.g. lower level looping, or just C++ implementation)
@ES-Alexander ES-Alexander added the question Further information is requested label Oct 15, 2021
@ES-Alexander
Copy link
Owner Author

Could possibly even implement separate installation targets, for [performance] vs [versatility] or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant