LmdbBackend¶
- class mmengine.fileio.LmdbBackend(db_path, readonly=True, lock=False, readahead=False, **kwargs)[源代码]¶
Lmdb storage backend.
- 参数:
db_path (str) – Lmdb database path.
readonly (bool) – Lmdb environment parameter. If True, disallow any write operations. Defaults to True.
lock (bool) – Lmdb environment parameter. If False, when concurrent access occurs, do not lock the database. Defaults to False.
readahead (bool) – Lmdb environment parameter. If False, disable the OS filesystem readahead mechanism, which may improve random read performance when a database is larger than RAM. Defaults to False.
**kwargs – Keyword arguments passed to lmdb.open.