Hi, I tried compiling metakit with DigitalMars compiler : http://www.digitalmars.com/ . (I try to replace MSDEVstudio compiler, too expensive !)
FIRST PROBLEM =============
It appears that opening a database for writing did not work because of the flag _O_NOINHERIT in :
bool c4_FileStrategy::DataOpen(const char* fname_, int mode_)
{
d4_assert(!_file);#if q4_WIN32 && !q4_BORC && !q4_WINCE int flags = _O_BINARY | _O_NOINHERIT | (mode_ > 0 ? _O_RDWR : _O_RDONLY);
On MSDEV5 documentation this flag does not exists for _open, but only for _sopen. I suppose _open ignore it.
On DigitalMars documentation it does not exists at all, but it is defined as 128 (I tried to printf it) !
Removing it make the whole thing work correctly. First problem solved.
SECOND PROBLEM ==============
I think more and more that this IDDE is quite good, and the compiler produce quick result.
for instance, on a 50 000 records database : MSDEV : adding takes 0.248 ms/record in avg commit (made every 3000 records) takes 125->1015 ms searching takes 23.81 ms/record in avg
DIGITALMARS : adding takes 0.253 ms/record in avg commit (made every 3000 records) takes 125->1047 ms searching takes 33.93 ms/record in avg
(a little bit worse).
But i'm afraid there is a problem with memory management. At the end, digitalmars executable takes 38Mb of memory, and MSDEV executable takes 800 kb. I think the whole file is in memory.
Trying with subviews and hashing, my digitalmars executable takes 1Gb of mem !
This is the modifications I made for DigitalMars : - fileio.cpp : I removed _O_NOINHERIT ifdef __DMC__ - string.cpp : I added __DMC__ for #define strcasecmp stricmp - win/config.h : I added __DMC__ with _MSC_VER >= 1000 for memory mapped file
I'm sure there must be other modifications to make it work correctly ! What test should I try, what option should I set ?
Thanks for any information.
-- Riccardo Cohen
Articque Les Roches 37230 Fondettes France web = http://www.articque.com tel: +33 02 47 49 90 49 fax: +33 02 47 49 91 49
_______________________________________________ metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit
