Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151953

Review use of dlsym and dlopen to improve startup time

XMLWordPrintable

      dlsym(RTLD_DEFAULT, sym) performs a linear search of all loaded libraries to find the named symbol. If we know which library we expect to find the symbol in then we should dlopen that library and pass its handle to dlsym.

      We should also check all search paths to ensure they are needed, and use the most effective loading mechanisms (eg lazy loading). See comments for more details.

      Although the absolute costs are not high using the specific library can be twice as fast in some circumstances - see JDK-8151322.

            redestad Claes Redestad
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: