aomega
asked on
Flex Grid Speed
Right now I'm having trouble with using the flex grid in terms of speed.
When I'm opening a file,, with 1800 rows and 1 coloumn
or 800 rows and 10 coloumns.
It take aprox. 30sec to sucessfully input all the data onto the flex grid.
Is it possible to input data in a flex grid with 1 long line of code that will fill an entire row with desired data?
or,, speed things up?
Please comment,, on some suggestions to speed things up..
Right now, we are inputing data in each cell using loops.
When I'm opening a file,, with 1800 rows and 1 coloumn
or 800 rows and 10 coloumns.
It take aprox. 30sec to sucessfully input all the data onto the flex grid.
Is it possible to input data in a flex grid with 1 long line of code that will fill an entire row with desired data?
or,, speed things up?
Please comment,, on some suggestions to speed things up..
Right now, we are inputing data in each cell using loops.
why not port this file to a database?
1. Set your MSFlexGrid.Redraw property to False to circumvent unnessary rendering.. or better yet.. set the MSFlexGrid.Visible property to False before loading. Run a benchmark on speed.. to gauge the improvement.
2. As you are loading cell by cell, it would appear that you are also inputting from disk cell by cell as well. Many small disk file reads are brutal when it comes to speed.. do whatever you can to make it a BIG disk read (all at once).. and the speed difference will be significant. Ideas for this would be as Azra suggested a Database.. or.. you could use an array stored as a Variant in a Binary access File. Not only are these methods faster, but they also reduce the amount of code required.
2. As you are loading cell by cell, it would appear that you are also inputting from disk cell by cell as well. Many small disk file reads are brutal when it comes to speed.. do whatever you can to make it a BIG disk read (all at once).. and the speed difference will be significant. Ideas for this would be as Azra suggested a Database.. or.. you could use an array stored as a Variant in a Binary access File. Not only are these methods faster, but they also reduce the amount of code required.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.