Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1715

ApacheHttpClient4Engine should avoid uses of non-tivial Object#finalize for better performance on OpenJDK

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 4.0.0.CR1
    • None
    • jaxrs
    • None

      Non-trivial finalizer in org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine is causing OpenJDK to retain memory in Finalizer queue even after the client is not accessible otherwise.

      https://github.com/resteasy/Resteasy/blob/master/resteasy-client/src/main/java/org/jboss/resteasy/client/jaxrs/engines/ApacheHttpClient4Engine.java#L537

      Does it make sense to rework that into PhantomReference and cleanup the client explicitly instead of relying on finalizers?

              rhn-support-asoldano Alessio Soldano
              vlsi_jira Vladimir Sitnikov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: