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

Precompute all zoom ratios, don't compute on startup #106

Closed
itsayellow opened this issue Aug 3, 2018 · 2 comments
Closed

Precompute all zoom ratios, don't compute on startup #106

itsayellow opened this issue Aug 3, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@itsayellow
Copy link
Owner

There's no reason to re-compute rational zoom ratios each time the program is started.

@itsayellow itsayellow added the enhancement New feature or request label Aug 3, 2018
@itsayellow itsayellow self-assigned this Aug 3, 2018
@itsayellow
Copy link
Owner Author

marcam.ImageWindow.init_ui(), (including init of ImageScrolledCanvasMarks() with create_rational_zooms()) now (computing zoom ratios):
76.106ms, 75.318ms, 82.900ms, 76.830ms, 76.495ms, 74.042ms, 75.759ms, 74.836ms, 80.372ms, 81.949ms

median: 76.3ms
mean: 77.5ms
std: 3.0ms

@itsayellow
Copy link
Owner Author

After precomputing zoom ratios:
65.741ms, 66.654ms, 67.580ms, 65.643ms, 66.657ms, 65.513ms, 66.749ms, 66.771ms, 65.978ms, 68.523ms, 65.413ms

median: 66.7ms
mean: 66.5ms
std: 0.9ms

Definitely better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant