You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performance issue found when attempting to get a list of file labels of a Resource object.
Using EObjectlabel() method generates a per-file new GET request to the whole list of resource files which -in my opinion- is highly redundant and rather slow when resource has lots of files (see test below).
Performance test with ASHS resource of ~790 files using label() method:
import timeit
code1 = """
import pyxnat
c = pyxnat.Interface(config='.pyxnat.cfg')
flist = c.select.experiment('ACME_E00001').resource('ASHS').files()
fnamelist = [f.label() for f in flist]
"""
elapsed_time = timeit.timeit(code1, number=10)/10
print(elapsed_time)
Performance issue found when attempting to get a list of file labels of a
Resource
object.Using
EObject
label() method generates a per-file new GET request to the whole list of resource files which -in my opinion- is highly redundant and rather slow when resource has lots of files (see test below).Performance test with
ASHS
resource of ~790 files usinglabel()
method:67.44406228000298
Same test using
_urn
private property (see here):0.18539366999757476
The text was updated successfully, but these errors were encountered: