Running BIDSlayout takes a long time

Hi,
I’m trying to adapt some of my scripts to use the pybids library.
Most of my uses involve loading data from the fmriprep folder.
As in some cases, this folder stands alone (without the raw data in BIDS format).
When running this code:

layout = BIDSLayout(folder, validate=False)

I find that it takes approximately 10 minutes. Indeed, the folder contains a lot of data (1.5T), but stills seems a bit too long for indexing, no?
Just to be clear, I have updated pybids to use the latest version (0.12.4)

I have experienced long times too with my datasets. It appears to be an optimization issue. There are some speedup tips here: https://github.com/bids-standard/pybids/issues/521 in the second post. I haven’t tried them out myself yet.

1 Like