By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,070 Members | 1,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,070 IT Pros & Developers. It's quick & easy.

process usage problem with filling a large list view

P: n/a
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a list
view one at a time row by row... adding each person to the list view, well
this works fine up to about 1,000 people then it start's to get really show
putting the people in (a lot of process time used up)... does anyone know of
any optimizations i could do to make this processess work a lot faster?
thanks
Nov 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Query analyzer in SQL Server tools seems to be able to load 90,000 people
records with out any problems at all... any idea how it works so fast? that
i could implement with a listview
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a list view one at a time row by row... adding each person to the list view, well
this works fine up to about 1,000 people then it start's to get really show putting the people in (a lot of process time used up)... does anyone know of any optimizations i could do to make this processess work a lot faster?
thanks

Nov 20 '05 #2

P: n/a
" I am then reading it into a list view one at a time row by row"

The Listview control supports binding, which means you should be able to
just databind to it and call it a day. Why add to it one by one?

Check this out:
http://msdn.microsoft.com/library/de...et08262002.asp

--
Elliot M. Rodriguez, MCSD

My .Net blog, with tips here and there:
http://derivedclass.europe.webmatrixhosting.net

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
Query analyzer in SQL Server tools seems to be able to load 90,000 people
records with out any problems at all... any idea how it works so fast? that i could implement with a listview
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a list
view one at a time row by row... adding each person to the list view, well this works fine up to about 1,000 people then it start's to get really

show
putting the people in (a lot of process time used up)... does anyone

know of
any optimizations i could do to make this processess work a lot faster?
thanks


Nov 20 '05 #3

P: n/a
I did that article already once, it is still very very slow with large
amounts of data... what I'm really looking for is an optimized version for
large (over 10,000 rows) of data.. essentially that example on MSDN is
adding items row by row also....

' load all subfields
For Field = 1 To mColumns.Count - 1
Item.SubItems.Add(GetField(InnerSource.Item(Row), _
mColumns(Field).Field).ToString)
Next
Items.Add(Item)
which is how mine is right now with the one I designed

"Elliot M. Rodriguez" <noemail> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
" I am then reading it into a list view one at a time row by row"

The Listview control supports binding, which means you should be able to
just databind to it and call it a day. Why add to it one by one?

Check this out:
http://msdn.microsoft.com/library/de...et08262002.asp
--
Elliot M. Rodriguez, MCSD

My .Net blog, with tips here and there:
http://derivedclass.europe.webmatrixhosting.net

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
Query analyzer in SQL Server tools seems to be able to load 90,000 people
records with out any problems at all... any idea how it works so fast?

that
i could implement with a listview
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a

list
view one at a time row by row... adding each person to the list view,

well this works fine up to about 1,000 people then it start's to get really

show
putting the people in (a lot of process time used up)... does anyone

know
of
any optimizations i could do to make this processess work a lot faster? thanks



Nov 20 '05 #4

P: n/a
copied the wrong piece of code in that example there, but you get the
idea... it's pretty much loading the list view row by row also from the data
set when its data bound
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:uN*************@TK2MSFTNGP09.phx.gbl...
I did that article already once, it is still very very slow with large
amounts of data... what I'm really looking for is an optimized version for
large (over 10,000 rows) of data.. essentially that example on MSDN is
adding items row by row also....

' load all subfields
For Field = 1 To mColumns.Count - 1
Item.SubItems.Add(GetField(InnerSource.Item(Row), _
mColumns(Field).Field).ToString)
Next
Items.Add(Item)
which is how mine is right now with the one I designed

"Elliot M. Rodriguez" <noemail> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
" I am then reading it into a list view one at a time row by row"

The Listview control supports binding, which means you should be able to
just databind to it and call it a day. Why add to it one by one?

Check this out:

http://msdn.microsoft.com/library/de...et08262002.asp

--
Elliot M. Rodriguez, MCSD

My .Net blog, with tips here and there:
http://derivedclass.europe.webmatrixhosting.net

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
Query analyzer in SQL Server tools seems to be able to load 90,000 people records with out any problems at all... any idea how it works so fast?

that
i could implement with a listview
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
> Well here is the problem, I have a data set with about 9,000 to 20,000 > people in it in the data table "people"... I am then reading it into a list
> view one at a time row by row... adding each person to the list view,
well
> this works fine up to about 1,000 people then it start's to get
really show
> putting the people in (a lot of process time used up)... does anyone

know
of
> any optimizations i could do to make this processess work a lot

faster? > thanks
>
>



Nov 20 '05 #5

P: n/a

"Elliot M. Rodriguez" <noemail> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
" I am then reading it into a list view one at a time row by row"

The Listview control supports binding, which means you should be able to
just databind to it and call it a day. Why add to it one by one?

mmm....

Not the default listview.... maybe this one...

http://msdn.microsoft.com/library/de...et08262002.asp

Check this out:
http://msdn.microsoft.com/library/de...et08262002.asp
--
Elliot M. Rodriguez, MCSD

My .Net blog, with tips here and there:
http://derivedclass.europe.webmatrixhosting.net

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
Query analyzer in SQL Server tools seems to be able to load 90,000 people
records with out any problems at all... any idea how it works so fast?

that
i could implement with a listview
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a

list
view one at a time row by row... adding each person to the list view,

well this works fine up to about 1,000 people then it start's to get really

show
putting the people in (a lot of process time used up)... does anyone

know
of
any optimizations i could do to make this processess work a lot faster? thanks



Nov 20 '05 #6

P: n/a
Whoops!

=)
"Elliot M. Rodriguez" <noemail> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
" I am then reading it into a list view one at a time row by row"

The Listview control supports binding, which means you should be able to
just databind to it and call it a day. Why add to it one by one?

Check this out:
http://msdn.microsoft.com/library/de...et08262002.asp
--
Elliot M. Rodriguez, MCSD

My .Net blog, with tips here and there:
http://derivedclass.europe.webmatrixhosting.net

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
Query analyzer in SQL Server tools seems to be able to load 90,000 people
records with out any problems at all... any idea how it works so fast?

that
i could implement with a listview
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a

list
view one at a time row by row... adding each person to the list view,

well this works fine up to about 1,000 people then it start's to get really

show
putting the people in (a lot of process time used up)... does anyone

know
of
any optimizations i could do to make this processess work a lot faster? thanks



Nov 20 '05 #7

P: n/a
Did you try perhaps Suspend Binding?
=)
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:Oo****************@TK2MSFTNGP09.phx.gbl...
copied the wrong piece of code in that example there, but you get the
idea... it's pretty much loading the list view row by row also from the data set when its data bound
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:uN*************@TK2MSFTNGP09.phx.gbl...
I did that article already once, it is still very very slow with large
amounts of data... what I'm really looking for is an optimized version for
large (over 10,000 rows) of data.. essentially that example on MSDN is
adding items row by row also....

' load all subfields
For Field = 1 To mColumns.Count - 1
Item.SubItems.Add(GetField(InnerSource.Item(Row), _
mColumns(Field).Field).ToString)
Next
Items.Add(Item)
which is how mine is right now with the one I designed

"Elliot M. Rodriguez" <noemail> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
" I am then reading it into a list view one at a time row by row"

The Listview control supports binding, which means you should be able to just databind to it and call it a day. Why add to it one by one?

Check this out:

http://msdn.microsoft.com/library/de...et08262002.asp

--
Elliot M. Rodriguez, MCSD

My .Net blog, with tips here and there:
http://derivedclass.europe.webmatrixhosting.net

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
> Query analyzer in SQL Server tools seems to be able to load 90,000

people
> records with out any problems at all... any idea how it works so fast? that
> i could implement with a listview
>
>
> "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> news:ur**************@TK2MSFTNGP12.phx.gbl...
> > Well here is the problem, I have a data set with about 9,000 to 20,000 > > people in it in the data table "people"... I am then reading it into a
> list
> > view one at a time row by row... adding each person to the list view, well
> > this works fine up to about 1,000 people then it start's to get really > show
> > putting the people in (a lot of process time used up)... does

anyone know
> of
> > any optimizations i could do to make this processess work a lot

faster?
> > thanks
> >
> >
>
>



Nov 20 '05 #8

P: n/a
not really sure what that is, can you give me some more information? Is that
like how SQL Server EM loads as it needes it? If so I'm not sure how to
implement that.. thanks!
"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
Did you try perhaps Suspend Binding?
=)
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:Oo****************@TK2MSFTNGP09.phx.gbl...
copied the wrong piece of code in that example there, but you get the
idea... it's pretty much loading the list view row by row also from the data
set when its data bound
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:uN*************@TK2MSFTNGP09.phx.gbl...
I did that article already once, it is still very very slow with large
amounts of data... what I'm really looking for is an optimized version for large (over 10,000 rows) of data.. essentially that example on MSDN is
adding items row by row also....

' load all subfields
For Field = 1 To mColumns.Count - 1
Item.SubItems.Add(GetField(InnerSource.Item(Row), _
mColumns(Field).Field).ToString)
Next
Items.Add(Item)
which is how mine is right now with the one I designed

"Elliot M. Rodriguez" <noemail> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> " I am then reading it into a list view one at a time row by row"
>
> The Listview control supports binding, which means you should be able to
> just databind to it and call it a day. Why add to it one by one?
>
> Check this out:
>

http://msdn.microsoft.com/library/de...et08262002.asp >
> --
> Elliot M. Rodriguez, MCSD
>
> My .Net blog, with tips here and there:
> http://derivedclass.europe.webmatrixhosting.net
>
> "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> news:em**************@TK2MSFTNGP11.phx.gbl...
> > Query analyzer in SQL Server tools seems to be able to load 90,000
people
> > records with out any problems at all... any idea how it works so fast? > that
> > i could implement with a listview
> >
> >
> > "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> > news:ur**************@TK2MSFTNGP12.phx.gbl...
> > > Well here is the problem, I have a data set with about 9,000 to

20,000
> > > people in it in the data table "people"... I am then reading it into
a
> > list
> > > view one at a time row by row... adding each person to the list

view,
> well
> > > this works fine up to about 1,000 people then it start's to get

really
> > show
> > > putting the people in (a lot of process time used up)... does

anyone > know
> > of
> > > any optimizations i could do to make this processess work a lot
faster?
> > > thanks
> > >
> > >
> >
> >
>
>



Nov 20 '05 #9

P: n/a
What is supended binding and how would you implement it? thanks!
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a list view one at a time row by row... adding each person to the list view, well
this works fine up to about 1,000 people then it start's to get really show putting the people in (a lot of process time used up)... does anyone know of any optimizations i could do to make this processess work a lot faster?
thanks

Nov 20 '05 #10

P: n/a
Sorta...

EM actually uses the API to draw what is needed onPaint. I'm pretty sure at
least (because it would appear to be doing so)

However, lets look at databinding for a second. Datasets / anything that
implements IBindingList emits an event called ListChanged, which databound
controls bind to to automatically invalidate/repaint the drawing area of the
control.

Now, this event gets fired EVERY TIME the list changes... so.. imagine with
your 10k+ records this event is being constructed and fired (because it does
have meaningful eventargs) that many times. So, your control has to
invalidate/repaint everytime...

by using suspendbinding, you dont' catch that ListChanged event, letting
your data fill normally and then when you resumebinding, it catches that
list changed event again. So, instead of repainting the surface 10k+ times,
it just repaints it once and each subsequent ListChanged event thereof.
Which you can imagine the cost savings on that.

Excuse my long tirades, as I'm sure Cor will point those out. =)

-CJ
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ub**************@TK2MSFTNGP12.phx.gbl...
not really sure what that is, can you give me some more information? Is that like how SQL Server EM loads as it needes it? If so I'm not sure how to
implement that.. thanks!
"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
Did you try perhaps Suspend Binding?
=)
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:Oo****************@TK2MSFTNGP09.phx.gbl...
copied the wrong piece of code in that example there, but you get the
idea... it's pretty much loading the list view row by row also from the
data
set when its data bound
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:uN*************@TK2MSFTNGP09.phx.gbl...
> I did that article already once, it is still very very slow with
large > amounts of data... what I'm really looking for is an optimized version
for
> large (over 10,000 rows) of data.. essentially that example on MSDN
is > adding items row by row also....
>
> ' load all subfields
> For Field = 1 To mColumns.Count - 1
> Item.SubItems.Add(GetField(InnerSource.Item(Row), _
> mColumns(Field).Field).ToString)
> Next
> Items.Add(Item)
>
>
> which is how mine is right now with the one I designed
>
> "Elliot M. Rodriguez" <noemail> wrote in message
> news:%2****************@tk2msftngp13.phx.gbl...
> > " I am then reading it into a list view one at a time row by row"
> >
> > The Listview control supports binding, which means you should be

able
to
> > just databind to it and call it a day. Why add to it one by one?
> >
> > Check this out:
> >
>

http://msdn.microsoft.com/library/de...et08262002.asp
> >
> > --
> > Elliot M. Rodriguez, MCSD
> >
> > My .Net blog, with tips here and there:
> > http://derivedclass.europe.webmatrixhosting.net
> >
> > "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> > news:em**************@TK2MSFTNGP11.phx.gbl...
> > > Query analyzer in SQL Server tools seems to be able to load 90,000 > people
> > > records with out any problems at all... any idea how it works so

fast?
> > that
> > > i could implement with a listview
> > >
> > >
> > > "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> > > news:ur**************@TK2MSFTNGP12.phx.gbl...
> > > > Well here is the problem, I have a data set with about 9,000 to 20,000
> > > > people in it in the data table "people"... I am then reading it into
a
> > > list
> > > > view one at a time row by row... adding each person to the

list view,
> > well
> > > > this works fine up to about 1,000 people then it start's to get really
> > > show
> > > > putting the people in (a lot of process time used up)... does

anyone
> > know
> > > of
> > > > any optimizations i could do to make this processess work a lot > faster?
> > > > thanks
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #11

P: n/a
* "Brian Henry" <brianiup[nospam]@adelphia.net> scripsit:
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a list
view one at a time row by row... adding each person to the list view, well
this works fine up to about 1,000 people then it start's to get really show
putting the people in (a lot of process time used up)... does anyone know of
any optimizations i could do to make this processess work a lot faster?


<http://www.ilypsys-systems.co.uk/ils1controls.zip>

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Nov 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.