From b2365b62ba52ec43414e0e52965f4e46753c99af Mon Sep 17 00:00:00 2001 From: mraiser Date: Sun, 3 Sep 2023 11:27:00 -0400 Subject: [PATCH] Support TCMalloc Add support for gperftools, which enables TCMalloc, providing marginally better performance and eliminating red text in the startup output, thereby relieving OCD-induced stress for the user. --- impl.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/impl.nix b/impl.nix index 9279fb7..7aee077 100644 --- a/impl.nix +++ b/impl.nix @@ -13,6 +13,7 @@ let xorg.libXv xorg.libXrandr zlib + gperftools # for xformers gcc @@ -37,6 +38,7 @@ pkgs.mkShell rec { libGLU libGL glib ]; + LD_PRELOAD = "${pkgs.gperftools}/lib/libtcmalloc.so"; LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; CUDA_PATH = pkgs.lib.optionalString isCUDA pkgs.cudatoolkit; EXTRA_LDFLAGS = pkgs.lib.optionalString isCUDA "-L${pkgs.linuxPackages.nvidia_x11}/lib";