Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a system with a complex Excel interface, running under VBA, storing
lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gesualdo,
See the MSKB Article # 319998 'BUG: Memory leak occurs when you query an open Excel worksheet by using ActiveX Data Objects (ADO)' http://support.microsoft.com/default...9998&Product=x See also: http://tinyurl.com/dpqqd --- Regards, Norman "Gesualdo" wrote in message ... I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Norman,
Thanks for that. A memory leak sounds a likely cause - however, I only use ADO to query Access, not data in Excel. This data is not pasted directly, but transferred from recordsets to arrays or single variables which are then pasted. Any other ideas? Gesualdo "Norman Jones" wrote: Hi Gesualdo, See the MSKB Article # 319998 'BUG: Memory leak occurs when you query an open Excel worksheet by using ActiveX Data Objects (ADO)' http://support.microsoft.com/default...9998&Product=x See also: http://tinyurl.com/dpqqd --- Regards, Norman "Gesualdo" wrote in message ... I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not 100% sure but since you have a dual core processor I think the reason
why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's an interesting aspect of dual core processors - worth looking into,
and thanks. However, I'm still baffled by the variability of the speed. Philip "Scott" wrote: I'm not 100% sure but since you have a dual core processor I think the reason why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just some things that I can think of that may help regarding the speed issue.
First to ensure it's as fast as possible try keeping the calculation command as manual and screen updating as false. If you don't have these, it might help a bit. As for variability, does it slow down when you rerun the macro? or during a one single run the computer is working harder then slowing down? In case it's because of running the process several times, check and make sure that you don't have any blank rows that excel might be including in the data (control-end to check the last row). This could increase the memory used by excel by quite a bit from one run to another. If it is a memory issue go to an empty cell and type this in """" =INFO("memused")/1024/1024 """" don't include the """". Anyways this will give you the amount of memory that is being used in Mb. If you find that the excel file gets bigger and bigger then you have at least found out your problem is a memory issue and not a bottleneck. cheers, Scott "Gesualdo" wrote: That's an interesting aspect of dual core processors - worth looking into, and thanks. However, I'm still baffled by the variability of the speed. Philip "Scott" wrote: I'm not 100% sure but since you have a dual core processor I think the reason why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The first thing I would do is to try and find where the time is going. would do this by writing a logging or trace function which output to text file or to a sheet on the spreadsheet. Then write the time to the log before and after each routine, o wherever you think is appropriate. By analysing the log file you wil at least know which routine is taking the time and if it varies fro run to run. I would be interested to know what you find. regard -- tony ----------------------------------------------------------------------- tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107 View this thread: http://www.excelforum.com/showthread.php?threadid=55353 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've used start-and-finish time logging but you're right, it might be useful
to have a more detailed breakdown of time taken by each part of a procedure. Cheers! Philip "tony h" wrote: The first thing I would do is to try and find where the time is going. I would do this by writing a logging or trace function which output to a text file or to a sheet on the spreadsheet. Then write the time to the log before and after each routine, or wherever you think is appropriate. By analysing the log file you will at least know which routine is taking the time and if it varies from run to run. I would be interested to know what you find. regards -- tony h ------------------------------------------------------------------------ tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074 View this thread: http://www.excelforum.com/showthread...hreadid=553537 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's very helpful - I have suspected the spreadsheets themselves of slowing
things down - for example, I 've found that resetting a large print area takes longer each time you do it. Again, the macro processes that most vary in speed are ones that dump data into a spreadsheet from a series of pasted arrays. I've also found (I think) that hiding unused rows slows things down, at least in the sort of thing I'm doing. Once again thanks for the help Scott. Philip "Scott" wrote: Just some things that I can think of that may help regarding the speed issue. First to ensure it's as fast as possible try keeping the calculation command as manual and screen updating as false. If you don't have these, it might help a bit. As for variability, does it slow down when you rerun the macro? or during a one single run the computer is working harder then slowing down? In case it's because of running the process several times, check and make sure that you don't have any blank rows that excel might be including in the data (control-end to check the last row). This could increase the memory used by excel by quite a bit from one run to another. If it is a memory issue go to an empty cell and type this in """" =INFO("memused")/1024/1024 """" don't include the """". Anyways this will give you the amount of memory that is being used in Mb. If you find that the excel file gets bigger and bigger then you have at least found out your problem is a memory issue and not a bottleneck. cheers, Scott "Gesualdo" wrote: That's an interesting aspect of dual core processors - worth looking into, and thanks. However, I'm still baffled by the variability of the speed. Philip "Scott" wrote: I'm not 100% sure but since you have a dual core processor I think the reason why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Instead of hiding unused rows why not just delete them? it'll speed up your
process. there's a macro that will do it for you, type in "delete unused rows" and I think you should get a hit on this site. If not I can always post it here, it's rather short. Another thing is when you're dumping data into the excel sheets are there any formulai and if so, does it take a long time to recalculate these formulai? On one sheet where I had a macro take a minute and a half I found that recalculation took 30 seconds, so I was able to trim a third of the run time off just because of that. Last thing, when you say resetting a print area, you don't have your page margins showing in excel do you? this alone takes up time and I have seen numerous posts where it was the last thing checked and was the actual problem. Just some more ideas, Cheers, Scott "Gesualdo" wrote: That's very helpful - I have suspected the spreadsheets themselves of slowing things down - for example, I 've found that resetting a large print area takes longer each time you do it. Again, the macro processes that most vary in speed are ones that dump data into a spreadsheet from a series of pasted arrays. I've also found (I think) that hiding unused rows slows things down, at least in the sort of thing I'm doing. Once again thanks for the help Scott. Philip "Scott" wrote: Just some things that I can think of that may help regarding the speed issue. First to ensure it's as fast as possible try keeping the calculation command as manual and screen updating as false. If you don't have these, it might help a bit. As for variability, does it slow down when you rerun the macro? or during a one single run the computer is working harder then slowing down? In case it's because of running the process several times, check and make sure that you don't have any blank rows that excel might be including in the data (control-end to check the last row). This could increase the memory used by excel by quite a bit from one run to another. If it is a memory issue go to an empty cell and type this in """" =INFO("memused")/1024/1024 """" don't include the """". Anyways this will give you the amount of memory that is being used in Mb. If you find that the excel file gets bigger and bigger then you have at least found out your problem is a memory issue and not a bottleneck. cheers, Scott "Gesualdo" wrote: That's an interesting aspect of dual core processors - worth looking into, and thanks. However, I'm still baffled by the variability of the speed. Philip "Scott" wrote: I'm not 100% sure but since you have a dual core processor I think the reason why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My Windows Task Manager (I hope this is correct English name, I am not sure
because I am using different language Windows, but I mean the one that appears after pushing ctrl+alt+del) shows that Excel uses both cores! However the total CPU usage sum up to 50%. This could mean that Excel is prepared for hyperthreading, but Windows limits total usage for one application to 50%. I am right? If it is true, is it possible to change Windows settings to use full Core 2 Duo power? I will be very grateful for your halp - I have complicted calculations that take a lot of time (even if I turn off screanupdating and set calculation manual:-). Regards, Krzysztof "Scott" wrote: I'm not 100% sure but since you have a dual core processor I think the reason why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Excel 2007 Calculation engine is the only part of any version of Excel
that supports multithreading. VBA does not. Charles __________________________________________________ Outlines for my Sessions at the Australia Excel Users Group http://www.decisionmodels.com/OZEUC.htm "Krzysztof" wrote in message ... My Windows Task Manager (I hope this is correct English name, I am not sure because I am using different language Windows, but I mean the one that appears after pushing ctrl+alt+del) shows that Excel uses both cores! However the total CPU usage sum up to 50%. This could mean that Excel is prepared for hyperthreading, but Windows limits total usage for one application to 50%. I am right? If it is true, is it possible to change Windows settings to use full Core 2 Duo power? I will be very grateful for your halp - I have complicted calculations that take a lot of time (even if I turn off screanupdating and set calculation manual:-). Regards, Krzysztof "Scott" wrote: I'm not 100% sure but since you have a dual core processor I think the reason why you don't get above 54% use is because of the two processors. i don't think Excel 2003 has hyperthreading technology which would allow for both processors to be used at the same time. So, next time you try running it, check your CPU usage history. If one side is up near 100 and it's only giving you 54% then it's because the other processor is doing little but background stuff. I just tried running a test on my computer, dual processor as well, and unless I'm running several programs at the same time I can see that one processor is working much harder than the other. Just a thing to check up on. Cheers, Scott "Gesualdo" wrote: I have a system with a complex Excel interface, running under VBA, storing lots of data in Access via ADO. Some processes take several minutes to complete, but the actual speed varies a lot, and at the moment things are running very slowly. I'm using Office 2003, on a 1.86Ghz Core Duo machine with 1Gb RAM. The processor doesn't run at more than 54% speed, suggesting there's some form of bottleneck somewhere, but it's the variable nature of the problem that's baffling. Sometimes I can get it to speed up, but it then settles down to a slow speed again. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Troubleshooting Excel 2003 calculation speeds | Excel Discussion (Misc queries) | |||
Running sql stored procedures from Excel | Excel Discussion (Misc queries) | |||
Running procedures on events xl2003 | Excel Programming | |||
Running form procedures from sheets | Excel Programming | |||
Help with automatically running procedures when an Excel file is accessed via web | Excel Programming |