Skip to content
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

perf: cache xpath #44

Open
lukehsiao opened this issue Feb 8, 2019 · 0 comments
Open

perf: cache xpath #44

lukehsiao opened this issue Feb 8, 2019 · 0 comments

Comments

@lukehsiao
Copy link
Contributor

lukehsiao commented Feb 8, 2019

When running on large datasets, this call to the xpath is the bottleneck of the apply function. Caching it, just with something like functools.lru_cache will speed things up.

# Get nodes
nodes = root.xpath(xpath)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant