DevExpress eXpressApp Framework (XAF) and eXpress Persistent Objects (XPO): how do I speed up the loading time of associations? -


i having problem speed of accessing association property large number of records.

i have xaf app parent class called myparent.

there 230 records in myparent.

myparent has child class called mychild.

there 49,000 records in mychild.

i have association defined between myparent , mychild in standard way:

in mychild:

// mychild (many) , myparent (one) [association("mychild-myparent")] public myparent myparent; 

and in myparent:

[association("mychild-myparent", typeof(mychild))] public xpcollection<mychild> mychildren {      { return getcollection<mychild>("mychildren"); } } 

there's specific myparent record called myparent1.

for myparent1, there 630 mychild records.

i have detailview class called myui.

the user chooses item in 1 drop-down in myui detailview, , code has fill drop-down mychild objects.

the user chooses myparent1 in first drop-down.

i created property in myui return collection of mychild objects selected value in first drop-down.

here code property:

[nonpersistent] public xpcollection<mychild> displayedvalues {         {         session thesession;         myparent theparentvalue;         xpcollection<mychild> thechildren;          theparentvalue = this.dropdownone;         // parent value          if thevalue == null)         {             // if none              return null;             // return null         }          thechildren = theparentvalue.mychildren;         // child values parent          return thechildren;         // return     } 

i marked displayedvalues property nonpersistent because needed ui of detailview. don't think persisting speed creation of collection first time, , after it's used fill drop-down, don't need it, don't want spend time storing it.

the problem takes 45 seconds call theparentvalue = this.dropdownone.

specs:

  • vista business
  • 8 gb of ram
  • 2.33 ghz e6550 processor
  • sql server express 2005

this long users wait 1 of many drop-downs in detailview.

i took time sketch out business case because have 2 questions:

  1. how can make associated values load faster?

  2. is there (simple) way program drop-downs , detailview runs faster?

yes, can 630 many items display in drop-down, code taking long suspect speed proportional 49,000 , not 630. 100 items in drop-down not many app.

i need quite few of these drop-downs in app, it's not appropriate force user enter more complicated filtering criteria each one. user needs pick 1 value , see related values.

i understand if finding large number of records slow, finding few hundred shouldn't take long.

firstly right sceptical operation should take long, xpo on read operations should add between 30 - 70% overhead, , on tiny amount of data should talking milli-seconds not seconds.

some general perf tips available in devexpress forums, , centre around object caching, lazy vs deep loads etc, think in case issue else, unfortunately hard second guess whats going on question, say, highly unlikely problem xpo more else, inclined @ session creation (this creates object cache) , sql connection code (the idatastore stuff), connections slow if hosts cannot not resolved cleanly , if not pooling / re-using connections problem can exacerbated.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -