JDK-8030057 : speed up forceLogSnapshot and checkAnnotations
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2013-12-12
  • Updated: 2017-02-10
  • Resolved: 2017-02-10
Description
This is a performance improvement

java/rmi/activation/Activatable/forceLogSnapshot 
method waitAllStarted is using recursive sleep to poll 50 restartedObject to be true, we can use modern CountDownLatch to implement blocking-time wait.
Also suggest shorten waiting time to 5 seconds.

java/rmi/activation/Activatable/checkAnnotations
We can subclass ByteArrayOutputStream which support notification when data was written. Also use two thread wait output string and error string to be not null
Comments
RMI is in maintaining status, activation is to be removed, it's not worth to improve the tests performance if the tests works well for now.
10-02-2017