We have a piece of code in Perl that requires optimizing and for this we are looking for an experienced perl developer.
The code is used to generate a colored layer on top of a PNG file. The GD::Image library is used for this. In the code it will first track the transparent layer and then draw a grid on it. These 2 processes can cause on complex images the CPU to spike to 100%. After this step is completed, circles are plotted on top of this depending on a variable input. This results in a new image being saved. This is done every minute.
As the image or the grid never changes after the code is launched the first time, we want to have the code modified so that the transparent layer and grid drawing subs aren't performed but just reapplied after the first time and hence avoid the 100% CPU spike.
Source code for the different subs will be given to the coder so that code can be optimized. This should be a few hours work at most for an experienced perl developer.
Please provide price and time required to complete project when bidding.
It seems that the controling procedure needs to be changed first so that the once generated grided image is reused while the script runs. Then the procedures can be checked for possible improvements. Maybe threads could be used if your Perl version supports them. But can't say much more until I see the code.
From your description it seems that the job can be split into processing of the image and grid, which you already have, saving the results into an in-memory buffer, and using this preprocessed data for the rest of the cycles which you also have - correct?