I'm carrying out a search and replace function, but the program execution is slow for the ammount of data that I want to crunch. Please have a look and advise if there is a better way to do things. This app is to be used on the desktop only. Ultimately the data will be a few MB.
I thought the writes to the screen - ProgressBar and % complete - may have been slowing it but if commented they make no difference. (Pitty, because I would have had a 1 second timer to do the screen updates instead.)
I've removed 63 of the 64 'IF' queries but that makes no difference either. (I would have been able to easily chop the 'IFs' in two but there is no point either.)
Is it because within my For...Next Loop; it takes a while to find the next row of the table?
Don't get me wrong, if you do a manual search and replace in Notepad - I could probably do it faster on paper(!), but if you load the file into MS Excel it is almost instantaneous.
The benefits of using a Table Control is that I may load the file as is, with <TAB> separation and save with <,> separation easily.
EDIT: 'IF' replaced with 'SELECT'
I thought the writes to the screen - ProgressBar and % complete - may have been slowing it but if commented they make no difference. (Pitty, because I would have had a 1 second timer to do the screen updates instead.)
I've removed 63 of the 64 'IF' queries but that makes no difference either. (I would have been able to easily chop the 'IFs' in two but there is no point either.)
Is it because within my For...Next Loop; it takes a while to find the next row of the table?
Don't get me wrong, if you do a manual search and replace in Notepad - I could probably do it faster on paper(!), but if you load the file into MS Excel it is almost instantaneous.
The benefits of using a Table Control is that I may load the file as is, with <TAB> separation and save with <,> separation easily.
EDIT: 'IF' replaced with 'SELECT'
Attachments
Last edited: