Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Hi Group,
Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
you can show the code?
regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Hi r,
Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
david,
It looks as though the process is not releasing memory as it goes through the 4 legs as you describe. I would suggest that you go back to the original author and discuss with them, as they may suggest that you reset any variables to nothing and so on to see if that makes a difference. -- Alan Hutchins "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
in this case the only idea is the verification of QueryTable
Property: BackgroundQuery = False regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Thank you, I will try and reset the variables and try again.
I did empty the IE cache between the 3rd and 4th leg, but that made no change. Thanks, David "Alan Hutchins" wrote: david, It looks as though the process is not releasing memory as it goes through the 4 legs as you describe. I would suggest that you go back to the original author and discuss with them, as they may suggest that you reset any variables to nothing and so on to see if that makes a difference. -- Alan Hutchins "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Thank you, I will try and reset the variables and try again.
I did empty the IE cache between the 3rd and 4th leg, but that made no change. Thanks, David "Alan Hutchins" wrote: david, It looks as though the process is not releasing memory as it goes through the 4 legs as you describe. I would suggest that you go back to the original author and discuss with them, as they may suggest that you reset any variables to nothing and so on to see if that makes a difference. -- Alan Hutchins "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Hi Again,
I did change the code so that the variables are put to nothing at each pass. I Escaped to pause the execution about 2/3 of the way through the 4th pass. I estimate the 4th pass will take about 38 minutes, so it appears that this did not work. Task Manager indicates that Excel.exe is consuming 99% of memory. If I go into the worksheet being acted upon, enter something simple in a cell or simply moving around can take 1 to 1 1/2 seconds, simply put it has slowed response time extremely. I do think we may be on the right track though, but Excel is using memory for other purposes, beyond variable memory storage. The code has been copied out of the original file and put in clean to a new module, so I am certain none of the other Class Modules have code in them. After Excel has had some time to "calm down" it is no longer comsuming 99% of memory, but in the worksheet, response time is very, very slow, as already noted. Maybe some one has some more ideas? BackgroundQuery = False is already the case. "Alan Hutchins" wrote: david, It looks as though the process is not releasing memory as it goes through the 4 legs as you describe. I would suggest that you go back to the original author and discuss with them, as they may suggest that you reset any variables to nothing and so on to see if that makes a difference. -- Alan Hutchins "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Hi Again,
I did change the code so that the variables are put to nothing at each pass. I Escaped to pause the execution about 2/3 of the way through the 4th pass. I estimate the 4th pass will take about 38 minutes, so it appears that this did not work. Task Manager indicates that Excel.exe is consuming 99% of memory. If I go into the worksheet being acted upon, enter something simple in a cell or simply moving around can take 1 to 1 1/2 seconds, simply put it has slowed response time extremely. I do think we may be on the right track though, but Excel is using memory for other purposes, beyond variable memory storage. The code has been copied out of the original file and put in clean to a new module, so I am certain none of the other Class Modules have code in them. After Excel has had some time to "calm down" it is no longer comsuming 99% of memory, but in the worksheet, response time is very, very slow, as already noted. Maybe some one has some more ideas? BackgroundQuery = False is already the case. "Alan Hutchins" wrote: david, It looks as though the process is not releasing memory as it goes through the 4 legs as you describe. I would suggest that you go back to the original author and discuss with them, as they may suggest that you reset any variables to nothing and so on to see if that makes a difference. -- Alan Hutchins "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Hi Again Group,
After the macro completed, CPU usage for excel remained at 95%+ for over 20 minutes. I do beleive it would have stayed that way for a very long time. After shutting down and reopening Excel, task manager showed Excel.exe CPU usage back to normal, even in the same file. Still very much at a loss for explaining this, especially after the macros had completed. Any insight would be greatly appreciated. Thanks, David "Alan Hutchins" wrote: david, It looks as though the process is not releasing memory as it goes through the 4 legs as you describe. I would suggest that you go back to the original author and discuss with them, as they may suggest that you reset any variables to nothing and so on to see if that makes a difference. -- Alan Hutchins "David" wrote: Hi r, Someone helped me me with the code and asked me not to share it. Sorry. There is really not anything that complicated. It it bring in a csv table from Yahoo and like I said the names are deleted. The person that helped me I trust. I did look through the various class modules to see if something might not be in them and found nothing. I might copy the code out and put it in a new file to test it and see if that makes a difference, but I expect not. Looking for others that might have had similar problems and found some sort of solution. What was most suprising was the continued Excel.exe memory usage, after the macro has finished. Still looking for insight. Thanks, David "r" wrote: you can show the code? regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "David" wrote: Hi Group, Hope all are having a good day. I have some code that does web queries. It is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back closes for a specific symbol and a specific single day. The list of symbols is a little over 800. It does this 4 times for 4 different dates, what I am calling legs. So 4 legs. Each leg about doubles the time of the previous leg. 2 minutes, 4 minutes, 5 minutes and 10 minutes. The query is deleted after each look up and all names are also deleted. When the macro is finished. Task manger indicated that Excel.exe is still using 90% of memory. I am very perplexed at this situation. Does anyone have any insights on this situation? One of the other problems I am having is that when I leave this message and check the box below "Notify me of replies", I do not recieve e-mail notifications. Thanks for your help, David |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
You have a memory leak. I've had this happen when querying from xl
files. There's also a kb article about it with text files, but I can't find it right now. This is similar - http://support.microsoft.com/kb/319998. The issue seems common across apps and file types. Basically, the data source has to be closed for memory to behave, otherwise it just keeps allocating (or trying to) more memory. Hope this helps. Cliff Edwards |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
You have a memory leak. I've had this happen when querying from xl
files. There's also a kb article about it with text files, but I can't find it right now. This is similar - http://support.microsoft.com/kb/319998. The issue seems common across apps and file types. Basically, the data source has to be closed for memory to behave, otherwise it just keeps allocating (or trying to) more memory. Hope this helps. Cliff Edwards |
#13
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA slows with time
Hi Cliff,
Thank you very much. I do believe this is the answer. I changed the code to deal with it, more avoid it, not deal with it. Thank you, David "ward376" wrote: You have a memory leak. I've had this happen when querying from xl files. There's also a kb article about it with text files, but I can't find it right now. This is similar - http://support.microsoft.com/kb/319998. The issue seems common across apps and file types. Basically, the data source has to be closed for memory to behave, otherwise it just keeps allocating (or trying to) more memory. Hope this helps. Cliff Edwards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Slows after about 1,000 records? | Excel Discussion (Misc queries) | |||
Row Height -- Slows VBA | Excel Programming | |||
Loop slows down | Excel Programming | |||
Filtering slows down a macro | Excel Worksheet Functions | |||
macro slows down | Excel Programming |