The first lines of code just initialize the Dataset and DataLoader, so no data will actually be loaded at this point, if not done in __init__.
The next(iter()) operation calls __getitem__ and loads the data, thus taking more time.
As you can see the time to load a single batch takes about 2.5 seconds.
So if you are not able to use multiple workers and can’t speed up the loading (e.g. SSD instead of HDD), your code will spend this time for loading each batch.