We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getProviderEndpointForLinkUrl
The code in this function has three nested loops, so it's O(n3) (cubic time). We can probably improve upon this.
Originally posted by @nickytonline in #132 (comment)
The text was updated successfully, but these errors were encountered:
We do have a step where the provider list is prepped for use, maybe change the structure of it so its easier to match url with schema.
Ie. going from this:
[ { provider_name: "Twitter", provider_url: "http://www.twitter.com/", endpoints: [ { schemes: [ "https://twitter.com/*/status/*", "https://*.twitter.com/*/status/*" ], url: "https://publish.twitter.com/oembed" } ] } ]
to this:
[ { scheme: "https://twitter.com/*/status/*", provider_name: "Twitter", provider_url: "http://www.twitter.com/", endpoint: "https://publish.twitter.com/oembed" }, { scheme: "https://*.twitter.com/*/status/*", provider_name: "Twitter", provider_url: "http://www.twitter.com/", endpoint: "https://publish.twitter.com/oembed" } ]
Then we could loop through once per oEmbed link, and can break out of the loop as soon as we find it.
Sorry, something went wrong.
No branches or pull requests
The code in this function has three nested loops, so it's O(n3) (cubic time). We can probably improve upon this.
Originally posted by @nickytonline in #132 (comment)
The text was updated successfully, but these errors were encountered: