NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Mike: yes, 32 Mb is a bit excessive. Is this a 1D coordinate variable? Is the dods server publically available?Anyway, the simplest solution is probably to restrict preloading to a maximum size, and allowing the user to control that. Easiest to make it global. Do you have a use case that requires finer granularity, eg by dataset?
John
Godin, Michael wrote:I am trying to open a DODS file and read a few values from it quickly. However, one of its coordinate variables has about 4 million double values, which are always cached when a DODSNetcdfFile is created due to the default preload setting. Thus, reading a few values involves at least 32MB of network traffic, which can take quite a while. I have a workaround (a subclassed version of DODSNetcdfFile that allows me to toggle preload), but it would certainly seem more elegant to allow one to specify in the DODSNetcdfFile constructor whether to preload, or to set some constraints on when preloading occurs (for example, if the coordinate axis contains less than X values). Would it be possible to put this on the "feature list" for the next version of netcdf-java? Thanks, Mike _____________________________________________ Michael A. Godin Software Engineer Monterey Bay Aquarium Research Institute Phone: 831-775-2063 http://www.mbari.org _______________________________________________ netcdf-java mailing list netcdf-java@xxxxxxxxxxxxxxxxFor list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
netcdf-java
archives: