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

How to search for works efficiently? #10

Open
hejops opened this issue Nov 21, 2022 · 2 comments
Open

How to search for works efficiently? #10

hejops opened this issue Nov 21, 2022 · 2 comments

Comments

@hejops
Copy link

hejops commented Nov 21, 2022

Going off the example in #1 (comment), I tried the following code:

from imslp import client
r = client.ImslpClient()
results = r.search_works(composer="Schoenberg")
ids = [r["intvals"]["pageid"] for r in results]
print(ids)

The search_works() call "appears" to produce unresponsive behaviour, as there is no indication that anything is being done. However, sending a keyboard interrupt after some time (a few minutes) does return data. Is there a more efficient method to get information on a large number of works?

@zezewewe
Copy link

zezewewe commented Feb 8, 2024

only the first run will take 5-10 minutes, thereafter the search occurs rather quickly :)

@hatzel
Copy link

hatzel commented Dec 13, 2024

Is there any way to persist this cache? The code appears to have some references to cache files (i.e., loading them), but I couldn't figure out where they are created.

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

3 participants