win 32 C++ code performance optimization
-
There is an application which downloads and installs a few applications on user machine after checking his machine for already installed things. We need to parallelize this code in order to optimize its performance. We are thinking of running one thread for downloads - one after another, and another thread for running the installs - as soon as a download is complete this thread will take over the installation. However are there more tricks to parallelize more things - say parallelize 2 downloads? Any other tricks to minimize CPU usage / optimize on memory usgae and reduce total time required? Thanks in advance SSC
-
There is an application which downloads and installs a few applications on user machine after checking his machine for already installed things. We need to parallelize this code in order to optimize its performance. We are thinking of running one thread for downloads - one after another, and another thread for running the installs - as soon as a download is complete this thread will take over the installation. However are there more tricks to parallelize more things - say parallelize 2 downloads? Any other tricks to minimize CPU usage / optimize on memory usgae and reduce total time required? Thanks in advance SSC
-
There is an application which downloads and installs a few applications on user machine after checking his machine for already installed things. We need to parallelize this code in order to optimize its performance. We are thinking of running one thread for downloads - one after another, and another thread for running the installs - as soon as a download is complete this thread will take over the installation. However are there more tricks to parallelize more things - say parallelize 2 downloads? Any other tricks to minimize CPU usage / optimize on memory usgae and reduce total time required? Thanks in advance SSC
samchepe wrote:
We need to parallelize this code in order to optimize its performance.
There's nothing wrong with splitting work between threads, but unless you have a multi-processor machine, creating additional threads does not necessarily result in a performance gain. Most of the time it has the opposite effect (due to all of the context switches).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
samchepe wrote:
We need to parallelize this code in order to optimize its performance.
There's nothing wrong with splitting work between threads, but unless you have a multi-processor machine, creating additional threads does not necessarily result in a performance gain. Most of the time it has the opposite effect (due to all of the context switches).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb