LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default slower by 10 times by adding an easy function????

I have to gather a lot of records from Oracle. I have a loop that is pulling
1 record an that is doing calculation with an array(1 to number of records
for that record, 1 to number of records for that record). It was going well
but I found out that some data from previous calculation were still in the
array. So I decided to initialize the array for each loop before going to
another record.

Dim x As Integer
Dim y As Integer
For x = 10 To totalOfRowsCellsArray
For y = 1 To totalOfRowsCellsArray
cellsArray(x, y) = 0
Next
Next


Generally totalOfRowsCellsArray = 10. Without that function, it takes 7
minutes to calculate 1000 records. By adding that function it took me 1hr.
Why???after all it's in the memory.
I tried with redim and its slow, I tried with Erase and its very slow too.
Please help if you know why.

Thanks
Jack

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pls confirm 2007 chart redraw is up to 10 times slower than 2003 larry godfrey Charts and Charting in Excel 27 September 6th 08 10:15 PM
macros making files slower and slower Raja Excel Discussion (Misc queries) 1 May 9th 08 12:26 AM
VBA Function gets slower every time I use it... Carlo Excel Programming 10 January 31st 07 04:37 PM
Excel gets slower and slower.... Romuald[_3_] Excel Programming 3 July 7th 05 02:25 PM
ExcelXP 10 times slower than 2000 on web queries. TH[_3_] Excel Programming 1 July 31st 03 01:21 AM


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"