You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Created) (JIRA)" <ji...@apache.org> on 2012/02/22 12:51:48 UTC

[jira] [Created] (CAY-1669) RuntimeProperties use of System properties becomes a contention point when creating query translators

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

                 Key: CAY-1669
                 URL: https://issues.apache.org/jira/browse/CAY-1669
             Project: Cayenne
          Issue Type: Improvement
          Components: Core Library
    Affects Versions: 3.1M3
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CAY-1669) RuntimeProperties use of System properties becomes a contention point when creating query translators

Posted by "Andrus Adamchik (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1669.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M4
    
> RuntimeProperties use of System properties becomes a contention point when creating query translators 
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1669
>                 URL: https://issues.apache.org/jira/browse/CAY-1669
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 3.1M3
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 3.1M4
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira