[Groonga-commit] groonga/groonga at 59b6f03 [master] io windows: always use sparse file

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 18 10:31:14 JST 2018


Kouhei Sutou	2018-01-18 10:31:14 +0900 (Thu, 18 Jan 2018)

  New Revision: 59b6f03249f8c48ae320910212ed97e50021bc19
  https://github.com/groonga/groonga/commit/59b6f03249f8c48ae320910212ed97e50021bc19

  Message:
    io windows: always use sparse file
    
    It reduces dist space and there are no performance demerit.

  Modified files:
    lib/io.c

  Modified: lib/io.c (+2 -14)
===================================================================
--- lib/io.c    2018-01-13 23:06:15 +0900 (4c34d677f)
+++ lib/io.c    2018-01-18 10:31:14 +0900 (2e6ef7e6d)
@@ -1,6 +1,6 @@
 /* -*- c-basic-offset: 2 -*- */
 /*
-  Copyright(C) 2009-2017 Brazil
+  Copyright(C) 2009-2018 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -64,7 +64,6 @@ typedef struct _grn_io_fileinfo {
 #define IO_HEADER_SIZE 64
 
 static uint32_t grn_io_version_default = GRN_IO_VERSION_DEFAULT;
-static grn_bool grn_io_use_sparse = GRN_FALSE;
 
 grn_inline static grn_rc grn_fileinfo_open(grn_ctx *ctx, fileinfo *fi,
                                        const char *path, int flags);
@@ -131,17 +130,6 @@ grn_io_init_from_env(void)
       grn_io_version_default = atoi(version_env);
     }
   }
-
-  {
-    char use_sparse_env[GRN_ENV_BUFFER_SIZE];
-
-    grn_getenv("GRN_IO_USE_SPARSE",
-               use_sparse_env,
-               GRN_ENV_BUFFER_SIZE);
-    if (use_sparse_env[0] && strcmp(use_sparse_env, "yes") == 0) {
-      grn_io_use_sparse = GRN_TRUE;
-    }
-  }
 }
 
 static grn_inline uint32_t
@@ -1778,7 +1766,7 @@ grn_fileinfo_open_common(grn_ctx *ctx, fileinfo *fi, const char *path, int flags
       break;
     }
 
-    if (grn_io_use_sparse) {
+    {
       FILE_SET_SPARSE_BUFFER buffer;
       buffer.SetSparse = TRUE;
       DWORD returned_bytes;
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180118/4c028ee8/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index