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

Iteration with next() is very slow #54

Open
Iris-Hinrichs opened this issue Oct 14, 2021 · 1 comment
Open

Iteration with next() is very slow #54

Iris-Hinrichs opened this issue Oct 14, 2021 · 1 comment

Comments

@Iris-Hinrichs
Copy link

Iris-Hinrichs commented Oct 14, 2021

Iteration with next() gets very slow when the OAIItemIterator is "empty" but StopIteration has not been raised yet. It takes several minutes.

Example:
from sickle import Sickle oai_end = 'http://ws.pangaea.de/oai/provider' sickle = Sickle(oai_end) records= sickle.ListRecords(**{'metadataPrefix':'oai_dc', 'set': 'query~cHJvamVjdDpsYWJlbDpEQU0gQU5EIGV2ZW50Om1ldGhvZDpGZXJyeUJveA', 'ignore_deleted':'True'}) entry = records(next) # records contains only one entry for the time being. This may change in future records(next)

@Iris-Hinrichs
Copy link
Author

part of the problem may be that more than 300.000 deleted records published by the above mentioned data provider are not assigned to any set. The query, however, finds these deleted records and I assume that they internally slow down the iteration process.

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

No branches or pull requests

1 participant