From 8c82534d89cef9260c12768e74eb4ef6c54f7217 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sun, 24 Dec 2006 00:46:13 -0500 Subject: Default core.packdGitWindowSize to 1 MiB if NO_MMAP. If the compiler has asked us to disable use of mmap() on their platform then we are forced to use git_mmap and its emulation via pread. In this case large (e.g. 32 MiB) windows for pack access are simply too big as a command will wind up reading a lot more data than it will ever need, significantly reducing response time. To prevent a high latency when NO_MMAP has been selected we now use a default of 1 MiB for core.packedGitWindowSize. Credit goes to Linus and Junio for recommending this more reasonable setting. [jc: upcased the name of the symbolic constant, and made another hardcoded constant into a symbolic constant while at it. ] Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- environment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'environment.c') diff --git a/environment.c b/environment.c index e559fd69c7..09976c7bf6 100644 --- a/environment.c +++ b/environment.c @@ -23,8 +23,8 @@ char *git_log_output_encoding; int shared_repository = PERM_UMASK; const char *apply_default_whitespace; int zlib_compression_level = Z_DEFAULT_COMPRESSION; -size_t packed_git_window_size = 32 * 1024 * 1024; -size_t packed_git_limit = 256 * 1024 * 1024; +size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE; +size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT; int pager_in_use; int pager_use_color = 1; -- cgit v1.2.3