Here’s what my init looks like for the dataset class:
   def __init__(self, opt):
        self.GT_env = lmdb.open(opt['dataroot_GT'], readonly=True, lock=False, readahead=False, meminit=True)
        keys = pickle.load(open(os.path.join(opt['dataroot_GT'], '_keys_cache.p'), "rb"))
        self.paths_GT = sorted([key for key in keys if not key.endswith('.meta')])

        self.LQ_env = lmdb.open(opt['dataroot_LQ'], readonly=True, lock=False, readahead=False, meminit=True)
        keys = pickle.load(open(os.path.join(opt['dataroot_LQ'], '_keys_cache.p'), "rb"))
        self.paths_LQ = sorted([key for key in keys if not key.endswith('.meta')])

It takes .005 seconds to run init per dataset, and I concatenate 8 datasets to make the final dataset. Let me know if you have any suggestions. Thanks for looking!