blender/intern/cycles/cmake
Lukas Stockner 4bde68cdd6 Cycles: Compress GPU kernels to reduce file size
Precompiled Cycles kernels make up a considerable fraction of the total size of
Blender builds nowadays. As we add more features and support for more
architectures, this will only continue to increase.

However, since these kernels tend to be quite compressible, we can save a lot
of storage by storing them in compressed form and decompressing the required
kernel(s) during loading.

By using Zstandard compression with a high level, we can get decent compression
ratios (~5x for the current kernels) while keeping decompression time low
(about 30ms in the worse case in my tests). And since we already require zstd
for Blender, this doesn't introduce a new dependency.

While the main improvement is to the size of the extracted Blender installation
(which is reduced by ~400-500MB currently), this also shrinks the download on
Windows, since .zip's deflate compression is less effective. It doesn't help on
Linux since we're already using .tar.xz there, but the smaller installed size
is still a good thing.

See #123522 for initial discussion.

Pull Request: https://projects.blender.org/blender/blender/pulls/123557
2024-06-23 00:52:30 +02:00
..
external_libs.cmake Build: Clean up oneAPI cmake messages 2024-06-12 19:21:43 +02:00
macros.cmake Build: Remove LLVM linking no longer needed by OSL 2024-02-14 12:06:52 +01:00
msvc_arch_flags.c License headers: use SPDX-FileCopyrightText in intern/cycles 2023-06-14 16:53:23 +10:00
zstd_compress.cpp Cycles: Compress GPU kernels to reduce file size 2024-06-23 00:52:30 +02:00