Hello people,
I have to optimize a very slow C program that does some processing on some data from a Db, creating some xml files. It has to work with a fairly large data set and is quite slow.
The original programmer used threads for this processing, putting items in input queues that the threads keep checking for, processing and passing to the next queue.
There are other bottlenecks (aside from the threading model) but we are running about 8 threads and I am thinking that these threading may be unnecessary since:
a) This is a batch process with no user interaction so it doesn't matter if we have a long running task.
b) There is no task that has priority. The process is quite sequential.
c) All the context switching probably slows things down a bit.
Would it help to remove the threading from this program?
Is it really helpful to use threads in such a sequentially processing batch program?
Regards.
I have to optimize a very slow C program that does some processing on some data from a Db, creating some xml files. It has to work with a fairly large data set and is quite slow.
The original programmer used threads for this processing, putting items in input queues that the threads keep checking for, processing and passing to the next queue.
There are other bottlenecks (aside from the threading model) but we are running about 8 threads and I am thinking that these threading may be unnecessary since:
a) This is a batch process with no user interaction so it doesn't matter if we have a long running task.
b) There is no task that has priority. The process is quite sequential.
c) All the context switching probably slows things down a bit.
Would it help to remove the threading from this program?
Is it really helpful to use threads in such a sequentially processing batch program?
Regards.
Comment