On Wed, 12 May 2010, Maurilio Longo wrote: Hi,
> Przemysław Czerpak wrote: > > If you have to keep existing OS then you can try to increase the memory > > used by Harbour RDD driver for buffers during indexing. > > In src/rdd/dbfcd/dbfcdx1.c[9191] I described how DBFCDX allocates memory. > > As you can see in the comment it should not allocate more then 35Mb memory. > > For modern computers such memory block seems to be quite small so you can > > try to increase it, i.e. to 256MB. > > In line 9167: > > ulSize = ( 1L << 20 ) / ( iLen + 4 ); > > change the default memory block size, i.e.: > > ulSize = ( 1L << 27 ) / ( iLen + 4 ); > > recompile DBFCDX (all whole Harbour) and make speed tests. > What about a runtime Set() option and/or have the default using more memory? > Todays pc should be able to handle 256Mb buffers without problems. You never know how much memory other processes may need so allocating too big memory blocks may cause problems for programs executed when other programs with hi memory consumption are running. Ideal situation is when OS can manage effectively write buffers. As alternative we can add runtime switch as you suggested to control the maximum size of allocated memory so user can tune it for the used environment but increasing the default settings may not be good idea even due to possible bad interactions in multiprocess environment. best regards, Przemek ps. can you check OS2 hbcom builds? _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour