开发者

performance concerns in using Java Advanced Imaging APIs

In our project we use JAI for showing parts of an image, rotating an image and basic zooming in an applet. We now observe that the applet takes a lot of time to load - around 20 seconds for the first time. But subsequently, it takes only 3 seconds (which is also quite high).

JAI development seems to have frozen since 2007.Atleast I could not find any download p开发者_运维技巧ost 2007 on the Java website.

Has anyone encountered loading issues and solved them in the context of JAI ? Is there a performant alternative to JAI ? The images we are using are in TIFF format and they can have multiple images in one physical file.

Any pointers greatly appreciated.


The first application startup (cold startup) could require lot of time, as you need to load tons of libraries including JAI. The second and next application startups (warm startup) are faster as runtime classes are cached in classes.jsa.

Then, the image processing will require the CPU and in order to paint it, the graphics card. With modern computers image processing (basic operations!) and handling (zoom, pan) is trivial and fast with JAI.

We have developed and image reviewing application with JAI + Image I/O and zoom and panning is extremely fast since we finished it in 2007 (1Mp images). After the image is loaded, the processing and handling is very fast, so we load the image in background threads to improve user experience.

The problem with JAI is it current state: frozen and/or dead, but it is mature, quite stable and other products like Apache Log4J have the same issue, no new developments since years, but people continue using it as there is no alternative (well, Logback!).

The are plenty of alternatives to JAI, like ImageMagick, but I didn't test them.

We careful when loading and processing images, like convert to 8bit/channel if possible, perform the operations in background before painting...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜