Client-Side Indexes???

G

Guest

I have a DataView and I'm changing the RowFilter several thousand times
during some processing. Is there a way to speed that up, something like a
client-side index I can use?

Currently the process takes several hours to run, most of that time being
spent changing the RowFilter on the DataView.

FYI, the DataView is pointing to a Parts table, during the processing I am
going through several thousand parts, and I need to look up some information
about each part, so I just change the RowFilter on the DataView to filter by
the Part Number I'm currently processing.
 
S

Sahil Malik

Optikal,

A better way to do this would be use relations and instead of recreating the
dataview everytime (which essentially changing the rowfilter means it does
all that internally) .. use GetChildRows, and GetParentRow instead.

That will probably be many times faster than recalculating the dataview
everytime.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
G

Guest

That worked beautifully, thanks Sahil!

Sahil Malik said:
Optikal,

A better way to do this would be use relations and instead of recreating the
dataview everytime (which essentially changing the rowfilter means it does
all that internally) .. use GetChildRows, and GetParentRow instead.

That will probably be many times faster than recalculating the dataview
everytime.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
S

Sahil Malik

You're welcome.

I applied the same concept to a website at a client I was recently working
with. They get about 5 million + hits a month so performance was a key
criterion for them. They were using this dataview stuff in every dropdown on
their site (some base class hierarchy). By this little one module change of
their code, I was able to increase their performance by over 33%.

Needless to say they were very happy. To make the long story short, yeah
this works in a fairly awesome way. Hmm .. I should blog about this .. and I
will at the end of the day .. right now I'm just too overloaded with work
plus I gotta try and leave early today .. !!! :)

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
G

Guest

Well in my case the processing went from about 5 hours (99.9% of that was
spent in changing the RowFilters) to about 2-3 minutes. So needless to say
I'm one happy developer!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top