[ 
https://issues.apache.org/jira/browse/DERBY-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463651
 ] 

Daniel John Debrunner commented on DERBY-2150:
----------------------------------------------

patch 1b Looks good, minor comment on this line:

maxActsSize = Math.max(acts.size(), maxActsSize);

This will mean that maxActsSize (a field)  is always modified, even if it isn't 
changing.
Would a simple if statement be better?

if (acts.size() > maxActsSize)
    maxActsSize = acts.size();
   

> Reduce use of synchronized collections in GenericLanguageConnectionContext
> --------------------------------------------------------------------------
>
>                 Key: DERBY-2150
>                 URL: https://issues.apache.org/jira/browse/DERBY-2150
>             Project: Derby
>          Issue Type: Improvement
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-2150-1a.diff, derby-2150-1b.diff
>
>
> In org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext, it is 
> probably safe to replace some of the synchronized collections with 
> unsynchronized ones. This should be investigated, and the unnecessary 
> synchronization should be removed. See discussion here: 
> http://www.nabble.com/Use-of-synchronized-containers-in-engine-code-tf2754469.html

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

        

Reply via email to