-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Faster image comparison decorator #98
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
Faster image comparison decorator #98
Conversation
1) Run the test itself that generates figure(s) only once, then savefig it to each output format. This appears to have an approx 2.75x speedup on run time. 2) Cleanup better after each test: Close all figures Reset rcParams to their defaults Reset the unit registry to defaults This requires the following changes to the tests themselves: 1) The tests no longer need to call 'savefig' -- just create figures and the decorator will find them. 2) Tests that don't use the image_comparison decorator should use the new cleanup decorator to make sure that cleanup happens.
…cape up multiple times.
…cape server and starting a new one to prevent memory leaks in Inkscape from becoming problematic.
…n test setup function to reset rcParams state.
This is moved over from here: @WeatherGod, @ivanov and @mdboom were participating over there. |
hmm, i'm getting some errors in python2.5:
and then stalls and never finishes. Is this a nose issue? (I'm on nose 1.0.0) |
Ah. I'm having issues with nose 1.0 as well. Investigating... |
This latest commit seems to fix the nose-1.0.0 issue on Python 2.7. @ivanov -- do you mind kicking the tires with Python 2.5? Python 3.x will have its own set of issues, I suspect, but I'll defer that to when I merge this into the py3 branch. |
@mdboom - I'm getting a bunch of |
It's probably hitting some sort of deadlock with the Inkscape server. I've got 0.48.1. But it also could be a difference in the behavior of the "subprocess" module in Python 2.5 vs. 2.7, or some sort of platform difference. If you revert lib/matplotlib/testing/compare.py to what is in master, does the stalling go away? If so, maybe we should defer the Inkscape server part of this pull request until we better understand how to do it in a robust way. |
mdboom, on 2011-04-28 05:37, wrote:
That did the trick, Mike! I still have a couple of failures on I still needed to use the get(1) business, instead of |
…mage_comparison_decorator Fix for Python 2.5 compatibility.
…er than running it as a server, which mysteriously causes a deadlock on some systems.
looks good now, Mike, thanks! |
Faster image comparison decorator
This is a riff on the ideas in the comments on the pull requests by Paul @ivanov to reduce memory consumption when running the regression tests. See:
#96
and
#56
This is different from the other two in that it: