hd0202 wrote:
Uminnsky wrote:
The program does some basic text file manipulation
As I know from an earlier post your program does
some hundred thousend basic text file manipulation. Your problem on the very slow computer is the disk and the filesystem. Have a look at my post "Performance of file ouput (FileAppend)" to find a better solution.
Hubert
Thanks for referencing this.
I made this switch, the commented was my old code, the speed difference in my situation was 47 seconds down to 18 seconds on the data tested:
Code:
Loop,read, % fflist, % output
{
Num+=%A_loopreadline%
Field:=pcsSplit%Num%
Fileappend, % field "`,"
Num-=%A_loopreadline%
}
;~ Loop,parse,fieldlist,`,
;~ {
;~ Num+=%A_loopfield%
;~ Field:=pcsSplit%Num%
;~ Fileappend,%field%`,,%A_programfiles%\WIA\Data\MainData1.csv
;~ Num-=%A_loopfield%
;~ }
This is pretty huge considering I plan for my program to build a database on thousands of files which would take anywhere from 8-12 hours. Just so I understand better what is going on, by switching from loop parse to loop read I am preventing the file from opening when it appends? Any suggestions on how I should or coudl speed up my next section of code...
Code:
Loop, read, %A_programfiles%\WIA\Data\MainData.csv
{
Bob:=A_loopreadline
Stringsplit, fish, A_loopreadline, `,
Loop, read, %A_programfiles%\WIA\Data\results.csv ; Import the results into the Data file
{
ifinstring,A_loopreadline, %fish1%`,%fish2%`,%fish9%
fileappend,%bob%`,%A_loopreadline%`n,%A_programfiles%\WIA\Data\Data.csv
}
}