-
Notifications
You must be signed in to change notification settings - Fork 16
Avoid re-making the DCT table if it is already correct when initialising #241
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
Conversation
As expected the massive init() cost on DCT is making the table. Here's a way to test this PR in max for speed against the old version:
To me this points to a need to see if this can be sped up anyway, as the cost of the init()(which I think runs once per file) massively outweighs the whole analysis itself - this is bad, but we might as well avoid it for now when it isn't even required (as the table is already the correct size/contents). |
FWIW my numbers on one particular folder are: Before PR: c 110,000 ms |
Testing this too:
|
This PR is the one remaining change from #172 that was not effectively integrated.
I will need to find a patch that demonstrates the speed issue to see if this is a worthwhile optimisation, but it also needs checking for anything that uses DCT. The behaviour to check is that around anything that causes an object to have init() called (so does the object produce the correct results on a second analysis for example)