Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1669

RuntimeProperties use of System properties becomes a contention point when creating query translators

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1M3
    • 3.1B1
    • Core Library
    • None

    Description

      Turns out System.getProperty(String) is synchronized internally, and can create a global contention point for the app. DefaultRuntimeProperties is calling System.getProperty every time, so if we want to minimize the impact of this lock, we need to cache property values when we read them. A specific case where this happened a lot was JdbcAdapter (and subclasses) createEJBQLTranslatorFactory and getQualifierTranslator methods. Both of these methods checked for whether we have a case-insensitive collation. These 2 methods are used a lot, so will cache the value of the property in the adapter instance.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: