Re: Berkeley DB with Euphoria
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 01, 2002
- 441 views
Irv Mullins writes: > include database.e as dbA > include database.f as dbB > ... > Can you depend on this to always work properly? > I don't know, maybe Rob can answer. Yes it will work. You'll have two independent sets of database variables. You can also switch back and forth between databases with db_select(). It takes almost zero time. It's db_select_table() that can be slow if you have a large table. Yesterday I speeded up db_select_table() quite a bit - no buffering but faster code. I've now added a lot of speedups to EDS. Some were distributed to a few people recently. I did some more very recently. I used profile_time in deciding what to speed up. Rather than have a bunch of people ask for the latest version, I've decided to place it in Recent User contributions. Just keep in mind that it hasn't been tested as much as the official 2.3 released version. The .zip also contains a new misc.e with pretty_print(). pretty_print() is now used by db_dump(). ----------------------------------------- database.e speedups: - Keys and records are read faster due to a faster decompress() routine. Almost twice as fast when the key or record data to be retrieved consists mainly of sequences of characters or small integers. This case is quite common. - allocating new space in a database is much faster, up to 4x faster, especially in large databases with a large list of free blocks - Inserting and deleting records in huge tables is now much faster. database.e is now about 25% faster for a table with 10,000 records and over 3x faster for a table with 100,000 records. - db_select_table() is faster - get4() is faster which speeds up almost everything to some extent Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com