diff options
author | Lukas Stockner <lukasstockner97> | 2021-01-15 00:02:48 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2021-01-15 00:03:29 +0300 |
commit | 0f2ae614a17a7c231b2a6e129633a99d9d1f12e3 (patch) | |
tree | 7d8b8f5873b96ce115cb13e80e6b78e92728a7e1 /source/blender/blenlib/CMakeLists.txt | |
parent | 33a558bf21579b57f94329bc98d87f28e178c17a (diff) |
Use mmap() IO for reading uncompressed .blends
Instead of submitting tons of tiny IO syscalls, we can speed things up
significantly by `mmap`ing the .blend file into virtual memory and directly
accessing it.
In my local testing, this speeds up loading the Dweebs file with all its
linked files from 19sec to 10sec (on Linux).
As far as I can see, this should be supported on Linux, OSX and BSD.
For Windows, a second code path uses `CreateFileMapping` and
`MapViewOfFile` to achieve the same result.
Reviewed By: mont29, brecht
Differential Revision: https://developer.blender.org/D8246
Diffstat (limited to 'source/blender/blenlib/CMakeLists.txt')
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index aa4c4efe7d4..b7a13596dd0 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -54,6 +54,7 @@ set(SRC intern/BLI_memblock.c intern/BLI_memiter.c intern/BLI_mempool.c + intern/BLI_mmap.c intern/BLI_timer.c intern/DLRB_tree.c intern/array_store.c @@ -243,6 +244,7 @@ set(SRC BLI_mempool.h BLI_mesh_boolean.hh BLI_mesh_intersect.hh + BLI_mmap.h BLI_mpq2.hh BLI_mpq3.hh BLI_multi_value_map.hh |