comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Issues with read_png and/or profiler
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Issues with read_png and/or profiler [message #80967] Fri, 27 July 2012 13:24
hugh.ramp is currently offline  hugh.ramp
Messages: 4
Registered: July 2012
Junior Member
I was reading over a network, although moving it onto local storage did not drastically increase the speed. However, I believe I've found that profiler was the source of misinformation, after editing my code it now shows read_png to take a reasonable amount of time. Instead, I found that the time appropriated to the read_png function was actually from the convol function, which I had been misusing. My code now runs much faster!

Thanks,
Hugh



On Wednesday, 25 July 2012 11:05:14 UTC-6, Brian J. Daniel wrote:
> Are you reading the image over a network connection? If so, your network speed is the bottleneck. Download your file locally before processing.
>
>
>
> Also, check out the convol function. I expect it to take much less time than 1.5 hours that you are reporting.
>
>
>
> -Brian
>
>
>
> On Wednesday, July 25, 2012 11:51:54 AM UTC-4, Hugh wrote:
>
>> Hi all,
>
>>
>
>> I'm running a fairly straight forward image correlation program, which should run fairly quickly (~O(n^4), I believe). However, the complexity seems to be rising much quicker than that, an 962x722 image with a 30x29 kernel takes ~16 hours (with profiler on), whereas a 640x480 image with the same kernel takes ~1.5 hours.
>
>>
>
>> Using profiler to determine the source for the complexity, I found that the Time self(ms) for read_png() was ~60,000,000ms, i.e., 99% of the runtime was loading in the image. However, time+sub(ms) reports taking only ~100ms. I was under the impression that Time+sub should always include time self, no? In any case, I don't think read_png should be taking nearly 16 hours to read a 700,000 pixel image.
>
>>
>
>> I was able to recreate the problem on a separate computer using the same code.
>
>>
>
>> Profiler Snapshot here: http://i.imgur.com/xJelD.png
>
>>
>
>>
>
>> Cheers and thanks,
>
>> Hugh
Re: Issues with read_png and/or profiler [message #80998 is a reply to message #80967] Wed, 25 July 2012 10:05 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
Are you reading the image over a network connection? If so, your network speed is the bottleneck. Download your file locally before processing.

Also, check out the convol function. I expect it to take much less time than 1.5 hours that you are reporting.

-Brian

On Wednesday, July 25, 2012 11:51:54 AM UTC-4, Hugh wrote:
> Hi all,
>
> I'm running a fairly straight forward image correlation program, which should run fairly quickly (~O(n^4), I believe). However, the complexity seems to be rising much quicker than that, an 962x722 image with a 30x29 kernel takes ~16 hours (with profiler on), whereas a 640x480 image with the same kernel takes ~1.5 hours.
>
> Using profiler to determine the source for the complexity, I found that the Time self(ms) for read_png() was ~60,000,000ms, i.e., 99% of the runtime was loading in the image. However, time+sub(ms) reports taking only ~100ms. I was under the impression that Time+sub should always include time self, no? In any case, I don't think read_png should be taking nearly 16 hours to read a 700,000 pixel image.
>
> I was able to recreate the problem on a separate computer using the same code.
>
> Profiler Snapshot here: http://i.imgur.com/xJelD.png
>
>
> Cheers and thanks,
> Hugh
Re: Issues with read_png and/or profiler [message #80999 is a reply to message #80998] Wed, 25 July 2012 10:02 Go to previous message
hugh.ramp is currently offline  hugh.ramp
Messages: 4
Registered: July 2012
Junior Member
Profiler snapshot of 640x480 image: http://i.imgur.com/gfcq2.png

Profiler snapshot of 220x159 image: http://i.imgur.com/8L7yp.png
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: cgwindow and cgplot, bug?
Next Topic: how to convert the date into julian date

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:13:31 PDT 2025

Total time taken to generate the page: 0.00638 seconds