reading files - slow performance?
hi, i'm making an applet with a filesystem jtree and a jpanel where thumbnails for pics in a directory are displayed.
i'm using Image img = ImageIO.read(new File(file));
and then scaling with jai.
i have a directory with ~20 1 to 2 mbs jpegs (2000x1700).
this dir takes like 30 sec or more to display its thumbnails.
i printlned time in milliseconds after each read and scaling.
scaling takes about 200millis, this is not really my concern, but reading takes 500millis.
so... what's going on? :)
should it take half a second to read a 1.5 mb jpeg? i don't think so..
or maybe... should i use multithreading? which of course i know nothing about.. i'm 2 weeks java old :)