Hi Experts,

Recently i written the script for text file to CSV file conversion. my script has read the directory and it would process the each file by file based on iteration. Coding and output was fine. i need to improve to speed up the script to convert the csv file. For example in that directory which contains 300 files to convert the csv file. So script processed to takes some time for getting the O/P. So please suggest me that subcutaneously process the all the at the same time. Any modules are available to speed up process for every 10 file by files among the 100 files(it is an example).

Thread module will helps to resolve the problem. either IO module will help?

Advanced Thanks,

Senthil. V

It is hard to know whether a change to your program will make it faster until you understand where it is spending its time now.

For example, if the program is slow because the operating system's file system is taking too long to open and close all those files, adding threads will not help. At the other extreme, if the program is limited by the cpu speed, then threading will also not help unless you are on a multicore processor. Even in that case, you might be able to rewrite the part of the program that is taking too long, and doing so might be more of an improvement than taking advantage of multiple cores.

So if your program is running too slowly, I think it is important not to change anything until you understand how the program spends its time.

Good advice.

Actually i was checked my code. problem is to read the 500 files when it takes some mins. i generally asked is there any perl modules are available for this case. thread also takes more time while compare with out bind thread.

Great Thanks,
Senthil. V

This article has been dead for over six months. Start a new discussion instead.