Poor DB4O performance - What am I doing wrong?

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2010-03-29T12:38:52Z Indexed on 2010/03/29 12:43 UTC
Read the original article Hit count: 324

Filed under:
|
|
|
|

I read Rob Conery's post about Object databases and thought I'd give it a go.

I have a class lets say Book with 15 properties mostly string, some int, one Datetime and 2 decimals.

I used Rob's code to open the database file etc to test on a Winforms project not a Web project.

So I did the following:

for(int i = 0; i < 1000000; i++)
{
    var Book = new Book();
    //Assign variables

    s.Save(Book);
}

s.CommitChanges();

This took at least a couple of minutes.

I then tried to retrieve all data to test speed:

var spp = s.All<Passports>();

This one line was quick, however, then doing:

sppp.Count() as well as a seperate test doing a foreach loop and incrementing a counter took a couple of minutes.

This seems quite slow to me. Am I doing something wrong or am I expecting too much?

© Stack Overflow or respective owner

Related posts about db4o

Related posts about object-database