Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: working with png data

by Discipulus (Abbot)
on Sep 09, 2019 at 10:23 UTC ( #11105859=note: print w/replies, xml ) Need Help??

in reply to working with png data

Hello Anonymous Monk,

sorry only sparse hints here: I see you use GD::Simple did you benchmarked your code using directly GD ? Just to be sure simple is not also slower.

You are processing a lot of data: you can use more cores to parse it. MCE offers you MCE::Map that sounds a good choice for your case. MCE::Examples shows code to chunk input data preserving the order. If you are able to rearrange one of the example I bet you get a big speed gain.

Show your progresses, please ;)


There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: working with png data
by Anonymous Monk on Sep 09, 2019 at 11:21 UTC
    If you dont know where the bottleneck lies.... Throw in threads and hope it speeds up sprintf?
      the time is wasted in :
      $pdata |= ~$png->wbmp($_) foreach (@col);
      the while loop with the sprintf is not the bottleneck. (maybe not optimal, but contribute less)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11105859]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2019-11-18 01:19 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (87 votes). Check out past polls.