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

Change PdsFile to use shelve files for everything #519

Closed
rfrenchseti opened this issue Dec 11, 2018 · 1 comment
Closed

Change PdsFile to use shelve files for everything #519

rfrenchseti opened this issue Dec 11, 2018 · 1 comment

Comments

@rfrenchseti
Copy link
Collaborator

Shelf files were a later addition to the PdsFile class. Re-factoring the code to use them for this purpose would not be a bad idea. Somebody would have to implement a glob.glob replacement that uses shelf files. Feel free!

Note that, if the match pattern crosses volume boundaries, it could actually be slower than a direct call to glob.glob. That's because each volume has its own shelf files.

On Dec 4, 2018, at 1:39 PM, Rob French rfrench@seti.org wrote:

It seems like PdsFile maintains these enormous "shelve" files (or pickle
files) that contain all sorts of useful information about every file in
pdsdata. But then when you call opus_products(), it uses glob() on the
real file system instead of looking into these files. Likewise when you
create a ViewSet for preview images, it has "must_exist=True", which
checks the actual filesystem. Same for the "exists" property.

Shouldn't we be using the shelve files for all of these cases?

.

@rfrenchseti
Copy link
Collaborator Author

Moved to pds-webtools

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