JDK-4686738 : setXORMode performance has regressed under linux from 1.3.1 to 1.4.X
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2002-05-16
  • Updated: 2002-07-23
  • Resolved: 2002-07-23
Related Reports
Duplicate :  
Description
Internal frames uses setXORMode to do outline dragging of internal frames
on the desktop if the user specifies this mode.  Between 1.3.1 and 1.4.X
setXORMode has regressed in performance approximately 10X-15X.  Attached is
a test case to show the regression.  A workaround would be helpful if you
know of one.

1.4.0fcs performance:
Total time (ms): 464
Average (ms): 0.928

1.3.1fcs performance:
Total time (ms): 34
Average (ms): 0.068

Comments
EVALUATION The problem is that in 1.3.x we used X's xor function to render/fill rectangles on the screen in xor mode. In 1.4 we're using our own software xor loop, and this involves copying bits from/to screen, which is slow. Also, since we're using XShm extension and cache the shared memory image, we have to perform XSync before each operation on the cached image to make sure that the previous XShmPutImage operation with this image has been complete, which also doesn't help. On solaris, where we can use DGA, 1.4 is actually faster than 1.3.1. Another note: the test is not completely correct, since it doesn't use Toolkit.sync(). When the sync is done after each drawRect call, the results are: 1.3.1 w/o sync: Total time (ms): 176 Average (ms): 0.352 1.3.1 w/ sync: Total time (ms): 773 Average (ms): 1.546 1.4 w/ sync: Total time (ms): 981 Average (ms): 1.962 The sync is important because w/o it the test is measuring how fast we can send X requests to the X server, which is different from when the X server completes the operation. ###@###.### 2002-05-17 Since the performance regression is not that bad, I'm downgrading the bug to P4. ###@###.### 2002-05-20 Closing as a duplicate of 4665237: REGRESSION: JInternalFrame outline dragging is very slow to respond ###@###.### 2002-07-23
20-05-2002