Yes, that’s true! It’s much faster when using the cursor of lmdb, and turn off the shuffle choice. You can shuffle the dataset by yourself and read them in order.
Maybe we don’t need the Dataset to support iterator. The API getitem has a index argument. if we turn off the shuffle switch of the dataloader, the index argument can indicate the end of the dataset. in this situation, we can use the lmdb cursor to get our data in order, one by one, it will be much faster, and the GPU utilization will rise.