-
Notifications
You must be signed in to change notification settings - Fork 7
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
Search: Returning CachedIrodsPath for data objects #283
Conversation
@jjkoehorst Does this solve your performance issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that there seems almost no performance impact generally for returning an extra column, this looks like a good idea. Just one small comment, otherwise seems like a sensible implementation!
ibridges/search.py
Outdated
key_map = [(k.icat_key, k) for k in item.keys()] | ||
for n_key, o_key in key_map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about simplifying it to simply looping over item.keys()
? Or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also possible. I can then transform the key object to a string in the loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just saves one line of code, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed.
Co-authored-by: qubixes <[email protected]>
To give some performance boost when searching for data objects the search function will now return a
CachedIrodsPath
and set the the checksum and the size to the value the search returns.That gives a splendid improvement.
Returning and IrodsPath for data objects and fetching the size
Returning a CachedIrodsPath with values from search