This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Description: Export to JPEG took some time, but export to PNG did not, even after several minutes; it was doing something but was not refreshing the display. I killed NetBeans and tried again, and left it running when I went home. According to the time stamp on the file it actually wrote the file out at 4AM - about 9 hours later. Exporting to png seems to work ok when the project is small but it's slower than exporting to jpg file. to png takes around 15 seconds on a class diagram with 6 classes and about the same number of elements in the model project, while it takes about just a few seconds for jpg format on my Solaris 10 Ultra-20 system. I did an experiment by reverse engineering an old ant project (ant.zip attached) which has 534 java files. I then created a class diagram from 5 selected classes. Exporting the resulting class diagram to jpg file took a few seconds while exporting to png seemed to hang the ide and I killed ide after waiting for 30+ minutes. See attached export-to-png-thread-dump.txt for the thread dump during the hang.
Created attachment 31230 [details] ant project
Created attachment 31231 [details] export-to-png-thread-dump
There are 2 parts of the issue: - different performance of different codecs - [locally] 3-5 sec jpg vs. 15-20 sec. png - remote case vs. local. - [remotely] about 2 mins jpg vs.... i really didn't wait for it to end for png. Looking into thread dumps we clearly see that it is one of the cases that are affected by offscreen pixmaps. Thus setting -Dsun.java2d.pmoffscreen=false brings image generation in both cases, jpg as well as png, to a few seconds. Local case of png benefits (15+ sec. becomes ~2 sec.) from this setting as well. Base on the availability of an easy workaround, that is really necessary for other similar remote X bugs, i intend to decrease the priority to P3.
see also issue 78505
This issue is for both Solaris and Linux platforms but there's no way to specify multiple platforms and OSes. It's ok for Windows platforms.
Of 2 above mentioned issues - offscreen pixmaps and png codec performance - the latter was improved as a fix for 91260
low use case not currently impacting our installed user base.
Remote usage of ide might be a low use case but exporting images to file doesn't seem to be low use case anymore since there are more users complaining about this.
I remove REMOTE_X from the summary because this issue is not specific to using ide remotely for exporting diagram to png format.
*** Issue 100243 has been marked as a duplicate of this issue. ***
Workaround: To enhance the performance, add the -J-Dsun.java2d.pmoffscreen=false command-line switch to the netbeans_default_options statement in the nb5.5-installation-directory/etc/netbeans.conf file and then restart the IDE.
fix as part of fix to issue 82394, so mark it as fixed.
verified in build netbeans-hudson-trunk-733-full.zip (070614)