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.

Bug 78574 - REMOTE_X: export even a small diagram to png format hangs ide for quite a long time
Summary: REMOTE_X: export even a small diagram to png format hangs ide for quite a lon...
Alias: None
Product: uml
Classification: Unclassified
Component: Output (show other bugs)
Version: 5.x
Hardware: All Solaris
: P2 blocker (vote)
Assignee: issues@uml
: 100243 (view as bug list)
Depends on:
Reported: 2006-06-20 13:12 UTC by bugbridge
Modified: 2007-06-15 01:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

ant project (1.65 MB, application/octet-stream)
2006-06-20 14:11 UTC, Alexandr Scherbatiy
export-to-png-thread-dump (10.98 KB, text/plain)
2006-06-20 14:11 UTC, Alexandr Scherbatiy

Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2006-06-20 13:12:18 UTC
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 ( 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.
Comment 1 Alexandr Scherbatiy 2006-06-20 14:11:26 UTC
Created attachment 31230 [details]
ant project
Comment 2 Alexandr Scherbatiy 2006-06-20 14:11:58 UTC
Created attachment 31231 [details]
Comment 3 Viktor Lapitski 2006-08-15 02:41:24 UTC
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
by offscreen pixmaps. Thus setting  
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.
Comment 4 Peter Lam 2006-10-25 00:35:38 UTC
see also issue 78505
Comment 5 Peter Lam 2006-10-27 07:10:29 UTC
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.
Comment 6 Viktor Lapitski 2007-02-01 00:27:32 UTC
Of 2 above mentioned issues - offscreen pixmaps and png codec performance - the
latter was improved as a fix for 91260
Comment 7 Peter Lam 2007-03-20 23:35:12 UTC
low use case not currently impacting our installed user base.
Comment 8 Peter Lam 2007-04-06 22:39:15 UTC
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.
Comment 9 Peter Lam 2007-04-06 22:40:35 UTC
I remove REMOTE_X from the summary because this issue is not specific to using
ide remotely for exporting diagram to png format.
Comment 10 Peter Lam 2007-04-06 22:43:16 UTC
*** Issue 100243 has been marked as a duplicate of this issue. ***
Comment 11 Peter Lam 2007-04-27 23:49:57 UTC
    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. 
Comment 12 Peter Lam 2007-06-15 01:21:30 UTC
fix as part of fix to issue 82394, so mark it as fixed.
Comment 13 Peter Lam 2007-06-15 01:22:32 UTC
verified in build (070614)