Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] custom wms renderer

Hi,
I have developed a custom wms renderer for udig which holds a reference to the original coverage retrieved from geoserver(raw geotiff crop ).

I have noticed a considerable slowdown as geotiff sizes get bigger (>20 seconds )

I have pinned the problem to be the following lines

----------------------------------------------
inputStream = wms.issueRequest(request).getInputStream();
image[0] = ImageIO.read(inputStream);
----------------------------------------------

Now I have tested with various java codes for streams, command line tools like "wget", "curl".

Command line tools retrieve the image in nearly 2 seconds.
Java code with buffered streams retrieve image in 20 seconds.


So I have used Apache Commons HTTPClient to retrieve the image, stored in a file, and let ImageIO stream from the filestream, now the responses are 3-4 seconds, which is much more acceptable.


That leaves the question to how ImageIO.read works in internals .

I have installed all JAI libs (1.1.3 and 1.1 with native libs)


How can I be sure if JAI is using native libs, or do you have any comments.

We can make BasicWmsRenderer2 much faster with the mentioned method.







Devrim Baris Acar


Back to the top