[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    [Gambas-user] Slow Gridview creation
From:       "M. Cs." <mohareve () gmail ! com>
Date:       2009-01-28 20:36:20
Message-ID: cf2b66e0901281236v4117c591v9ae180d3263b8790 () mail ! gmail ! com
[Download RAW message or body]

Dear Benoit,
I would like to know whether it is possible to make GridView creation and
filling process faster. I'm using databases for storage, then I'm doing the
querries, which are giving tens of thousand results, or tens of thousand
rows with five columns each. First, I put the results into five separated
arrays, and afterwards I'm using them with a FOR...NEXT cycle. This is the
code I'm using:

visszhang = DBconX.Exec(quert)
FOR EACH visszhang
nev.Add(visszhang!"FName")
ut.Add(visszhang!"FPath")
nagy.Add(Round(visszhang!"FSize" / 1048576, -2))
mikor.Add(visszhang!"FChanged")
kotet.Add(point)
NEXT
dis = nev.Count
gV.Rows.Count = dis
FOR i = 0 TO dis - 1
gV[i, 0].Text = nev[i]
gV[i, 1].Text = kotet[i]
gV[i, 2].Text = ut[i]
gV[i, 3].Text = nagy[i]
gV[i, 4].Text = mikor[i]
NEXT

But like this it takes eternity to create a table of 17.000 rows. There is a
remark in Gambas documentation:
* You should use the last
method<file:///usr/share/gambas2/help/help/def/method.html>if you have
thousands of rows to display.
*What does it exactly mean? Can you recommend me a faster algorithm? Thanks!
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic