-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve performance? #7
Comments
The bulk of the time appears to be spent checking lint errors, more specifically waiting for the data to come back. Not tons that can be done, other than setting up a linter locally. And that sounds like a bad idea. |
Hmm..The parsoid api doesn't take batch requests, but that doesn't mean I can't batch requests. Combine a block of signatures into one newline-delimited string, send that off. If it passes the linter, assume all are good. If not, iterate over them all. |
Also: Short-circuit on check_fanciness. If there's no fancy markup, there's no potential for lint errors. |
batched lint checks and short circuiting implemented, testing... |
alright, implementing batched lint queries at n=5 results in about a 0.072s savings per signature and a 30% reduction in time spent waiting for lint errors. Short circuiting was not fully implemented, will try again with better implementation. |
fixing short circuiting reduced 1-sig check time by another .09s, and linter time by .036s, for a combined (batch lint and short circuit) reduction of about 0.161s. Over the 4754 enwiki signatures checked, that adds up to about 13 minutes. |
The per-call time for iter_active_sigs fluctuates, so it's hard to tell if there's been a real effect. I'm going to switch to the buffered cursor though, it's likely nicer on the database. |
|
The text was updated successfully, but these errors were encountered: