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
performance suggestion #73
Comments
I would suggest subclassing the existing |
ah, subclassing is a good idea. i'll redo the PR I made. |
I was suggesting that you subclass it in your own application -- I don't plan to merge the optimization into the codebase in the interests of keeping things simple and extensible. |
That's fair. Would you be interested at all in this reorg of migrating the providers into a dict? You can strip out the 'domain' key if you want. master...jvanasco:feature-library fyi, |
I'm considering migrating to micawber from a custom oembed consumer, and wanted to suggest a performance improvement that I am willing to generate a PR for.
I'd like to extend the
ProviderRegistry
with a secondary internal register that nests providers under domain names.this would allow users to optionally avoid a regex match against every provider and only test the domain.
some light tests on a quick mockup showed the lookups to run in 30% the time -- including the overhead of parsing the domain name from a url, but about 5% of the time if you have the domain already.
we would be using this on a high volume indexer, so this performance is a need.
The text was updated successfully, but these errors were encountered: