[fdo-commits] r2567 - trunk/Thirdparty/Sqlite3.1.5/Src

svn_fdo at osgeo.org svn_fdo at osgeo.org
Tue Feb 20 17:04:26 EST 2007


Author: badreddinekaroui
Date: 2007-02-20 17:04:26 -0500 (Tue, 20 Feb 2007)
New Revision: 2567

Modified:
   trunk/Thirdparty/Sqlite3.1.5/Src/os_win.c
Log:
Trac#13: Merging defect fixes from branch 3.2.x to the trunk

Iterating through all the features of a large SDF file causes a  significant loss of the system available memory. This is due to the system  disk cache which tend to use all the memory it can get.
 The fix is to remove the random access option when opening the SDF file.
 That reduced the memory used by the disk cache to a reasonable amount and  did not impact the performance of the SDF provider(it actually helped a  bit).


Modified: trunk/Thirdparty/Sqlite3.1.5/Src/os_win.c
===================================================================
--- trunk/Thirdparty/Sqlite3.1.5/Src/os_win.c	2007-02-20 22:02:00 UTC (rev 2566)
+++ trunk/Thirdparty/Sqlite3.1.5/Src/os_win.c	2007-02-20 22:04:26 UTC (rev 2567)
@@ -112,7 +112,7 @@
      FILE_SHARE_READ | FILE_SHARE_WRITE,
      NULL,
      OPEN_ALWAYS,
-     FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
+     FILE_ATTRIBUTE_NORMAL, /* OSGeo removed FILE_FLAG_RANDOM_ACCESS as it triggers an excessive disk cache usage */
      NULL
   );
   if( h==INVALID_HANDLE_VALUE ){
@@ -121,7 +121,7 @@
        FILE_SHARE_READ,
        NULL,
        OPEN_ALWAYS,
-       FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
+       FILE_ATTRIBUTE_NORMAL, /* OSGeo removed FILE_FLAG_RANDOM_ACCESS as it triggers an excessive disk cache usage */
        NULL
     );
     if( h==INVALID_HANDLE_VALUE ){
@@ -202,7 +202,7 @@
      0,
      NULL,
      OPEN_EXISTING,
-     FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
+     FILE_ATTRIBUTE_NORMAL, /* OSGeo removed FILE_FLAG_RANDOM_ACCESS as it triggers an excessive disk cache usage */
      NULL
   );
   if( h==INVALID_HANDLE_VALUE ){



More information about the fdo-commits mailing list