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

Creating requests ends up causing lots of work and memory allocation scanning the classpath repeatedly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 6.2.2.Final
    • 6.2.1.Final
    • Core
    • None

      While doing performance testing of an application, we noticed multiple gigabytes of byte[] allocation happening. From the stack trace (condensed frames a bit),

      ClientWebTarget.path -> ClientWebTarget.newInstance -> ClientConfiguration.init -> ResteasyProviderFactoryImpl.init -> Options.getProperty -> ServiceLoader$LazyClassPathLookupIterator.parse

      Every time you create a new WebTarget, which is a frequent operation especially if you use any path params, we end up iterating classpath resources and reading from disk.

       

      I created a proposal to help avoid this lookup sometimes:

      https://github.com/resteasy/resteasy/pull/3373

      but I am not sure this is the right fix.

       

      Thank you for your consideration.

              Unassigned Unassigned
              stevenschlansker Steven Schlansker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: