EntityView2 Performance

Posts   
 
    
Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 05-Oct-2008 09:11:10   
  EntityView2<QrySkillSearchOrderEntity> SkillView = new EntityView2<QrySkillSearchOrderEntity>(_oSkills);
        QrySkillSearchOrderEntity Skill = new QrySkillSearchOrderEntity();

        IPredicate filter = (TblSkillFields.SkillId == SkillId);
        SkillView.Filter = filter;

        if (SkillView.Count > 0)
        {

.... } else { .... }

_oSkills has about 60,000 records but his performs very slow. Is their a better way to search the records for a particular record.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39863
Joined: 17-Aug-2003
# Posted on: 05-Oct-2008 12:05:48   

Try to unbind the view from any bound controls. Though it shouldn't be that slow.

Also, which llblgen pro version/ runtime build nr?

Frans Bouma | Lead developer LLBLGen Pro
Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 05-Oct-2008 12:45:54   

its not bound any controls.

llblgen 2.6,adapter,winforms,dotnet2

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 06-Oct-2008 12:21:31   

Perhaps you should do a linear search? The predicates do a compare which might be less efficient, though we believe it should be fast enough.

EntityView2<QrySkillSearchOrderEntity> SkillView....... ... IPredicate filter = (TblSkillFields.SkillId == SkillId);

Are you trying to filter on a field of a related entity?

Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 07-Oct-2008 02:16:07   

on a field

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 07-Oct-2008 08:29:15   

These are the results for my test on a 60,000 record's table (ms= milliseconds):

Fetch the entities: 1938ms Build the EntityView2: 14ms Filter the EntityView2: 93ms

Could you please post the DDL structure of your table so we could test that?

David Elizondo | LLBLGen Support Team