[fdo-commits] r743 - branches/3.2.x/Thirdparty/Sqlite3.1.5/Src

svn_fdo at osgeo.org svn_fdo at osgeo.org
Wed Feb 7 17:33:35 EST 2007


Author: badreddinekaroui
Date: 2007-02-07 17:33:35 -0500 (Wed, 07 Feb 2007)
New Revision: 743

Modified:
   branches/3.2.x/Thirdparty/Sqlite3.1.5/Src/os_win.c
Log:
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: branches/3.2.x/Thirdparty/Sqlite3.1.5/Src/os_win.c
===================================================================
--- branches/3.2.x/Thirdparty/Sqlite3.1.5/Src/os_win.c	2007-02-07 22:05:50 UTC (rev 742)
+++ branches/3.2.x/Thirdparty/Sqlite3.1.5/Src/os_win.c	2007-02-07 22:33:35 UTC (rev 743)
@@ -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