Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 26063 Details for
Bug 24451
Reading JPEG images slow in SWT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
jpeg tester
JPEGTester.java (text/plain), 2.17 KB, created by
Slash
on 2005-08-12 14:55:59 EDT
(
hide
)
Description:
jpeg tester
Filename:
MIME Type:
Creator:
Slash
Created:
2005-08-12 14:55:59 EDT
Size:
2.17 KB
patch
obsolete
>import java.util.Vector; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.ScrolledComposite; >import org.eclipse.swt.events.*; >import org.eclipse.swt.graphics.*; >import org.eclipse.swt.widgets.*; >import org.eclipse.swt.dnd.*; >import java.io.File; >import javax.swing.*; > > > > >public class JPEGTester { > > > public Image [] imgTab; > public ImageIcon [] imgTab2; > public File [] imgFic; > public String path=System.getProperty("user.dir") + "\\..\\images\\"; > > public JPEGTester() > { > System.out.println("start SWT test..."); > File file = new File(path); > imgFic=file.listFiles(); > imgTab=new Image[imgFic.length]; > imgTab2=new ImageIcon[imgFic.length]; > readmanyjpeg(); > disposeAll(); > //test SWING > System.out.println("start SWING test..."); > readmanyjpeg2(); > } > > > > public void readmanyjpeg() > { long time=System.currentTimeMillis(); > for (int i=0;i<imgFic.length;i++) > { imgTab[i] = new Image(Display.getCurrent(),imgFic[i].getPath()); > } > long timeFinal=System.currentTimeMillis(); > System.out.println("SWT: temps total de completion:"+((double)(timeFinal-time)/1000)+" sec"); > System.out.println("SWT: temps moyen par image:"+((double)(timeFinal-time)/(double)imgFic.length) + "ms"); > //up to 450+ Mo consume for 500 jpeg of 100K each .... > } > > > > public void disposeAll() > { System.out.println("disposing"); > for (int i=0;i<imgFic.length;i++) > { imgTab[i].dispose(); > } > } > > > public void readmanyjpeg2() > { long time=System.currentTimeMillis(); > for (int i=0;i<imgFic.length;i++) > { imgTab2[i] = new ImageIcon(imgFic[i].getPath()); > } > long timeFinal=System.currentTimeMillis(); > System.out.println("SWING: temps total de completion:"+((double)(timeFinal-time)/1000)+" sec"); > System.out.println("SWING: temps moyen par image:"+((double)(timeFinal-time)/(double)imgFic.length) + "ms"); > //up to 450+ Mo consume for 500 jpeg of 100K each .... > } > > > public static void main(String[] args) { > JPEGTester jpegtester = new JPEGTester(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 24451
:
2115
|
2909
|
2910
| 26063 |
27626
|
27636
|
29365