Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > for loops and c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 5641 of 5728
Post > Topic >>

for loops and calls to functions/objects

by Charles at AER <cpaxson@[EMAIL PROTECTED] > Apr 15, 2008 at 08:11 AM

Dear Newsgroup,

A program I am optimizing loads a series of images from netcdf files,
the user may select an arbitrary number of images to display.  Within
a for loop, the program calls a netcdf reader that initializes a
netcdf object, gets lat and lon info and then grabs an image. If the
user wants to look at 10 images, the read net cdf is called 10 times,
and the time to initialize the netcdf object takes 0.1 seconds, and to
get the image takes 0.2 seconds.   Here's the rub, if the user wants
to investigate 70 images, the netcdf initialization is 10 times longer
- about 1 second, similarly, the get method loads the image in 2
seconds.  So to read 10 images takes 3 seconds, and to read 70 images
takes 210 seconds.  The exponential increase is untenable. Does any
one understand what is happening, and are there work-arounds?  Thanks.

Sincerely,

Charles




 3 Posts in Topic:
for loops and calls to functions/objects
Charles at AER <cpaxso  2008-04-15 08:11:42 
Re: for loops and calls to functions/objects
Conor <cmancone@[EMAIL  2008-04-15 11:59:44 
Re: for loops and calls to functions/objects
Charles at AER <cpaxso  2008-04-15 12:29:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 1:03:39 CDT 2008.