Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6255835
Votes 0
Synopsis TransferHandler.pasteAction should not use Clipboard.getContents() for performance reasons
Category java:classes_swing
Reported Against mustang
Release Fixed
State 5-Cause Known, request for enhancement
Priority: 3-Medium
Related Bugs 4287795 , 4790833 , 4818143
Submit Date 15-APR-2005
Description
TransferHandler's paste action uses Clipboard.getContents()
to retrieve a Transferable from the clipboard and pass it to
TransferHandler.importData(). Clipboard.getContents() is known
to be quite expensive as it fetches data in all available flavors:
refer to the bug 4790833(Memory usage shoots way up using
Clipboard.getContents()) which was fixed in tiger. On the other
part, data in only one flavor are pasted typically.

The fix for 4790833 introduced new Clipboard methods:
getAvailableDataFlavors(), isDataFlavorAvailable() and
getData() that allows to fetch data for only one flavor.

So I propose to make use of these Clipboard methods in the
implementation of TransferHandler's paste action.

  xxxxx@xxxxx   2005-04-15 10:05:54 GMT
Work Around
N/A
Evaluation
This is definitely something worth investigating for a future performance enhancement.
  xxxxx@xxxxx   2005-07-20 21:00:27 GMT
Posted Date : 2005-07-20 21:00:27.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang