db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-938) ContextManager needs to be optimized
Date Sun, 19 Feb 2006 18:29:32 GMT
    [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12366974 ] 

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

Thanks for the new patch: Some minor comments:

- Class javadoc comment for CtxStack is out of date I think it will cause Javadoc errors due
to the
references to getStatementContext & getStatementContextStackSize. The sentence beforre
these
references is also stale.

- Should the methods in CTxStack be 'package protected' instead of public. The class is not
accessible outside the package.

- Should the ContextManager.getContextStack() method be declared to return a List (ie. the
interface) not a specific implementation?
  This would have two advantages:
           1) you could return a read-only list to enforce your requirement using
                   java.util.Collections.unmodifiableList()
                    Not sure what performance effect this would have though.

            2) You could use java.util.Collections.EMPTY_LIST instead of having the new field
voidArrayList_

- If we keep voidArrayList_ , shouldn't it be a static?

- For the new method getContextStack, is the caller allowed to push/pop contexts with the
same id through
the context manager while it is iterating the contents of the returned List,  or will that
causes issues? E.g. popping
a context with the same id, might cause a no such element exeption on the returned list.

- For the new method getContextStack, it would be good to specify which order the contexts
are in the returned List,
is the element at 0 the first pushed or the most recently pushed.





> ContextManager needs to be optimized
> ------------------------------------
>
>          Key: DERBY-938
>          URL: http://issues.apache.org/jira/browse/DERBY-938
>      Project: Derby
>         Type: Improvement
>   Components: Performance
>     Reporter: Dyre Tjeldvoll
>     Assignee: Dyre Tjeldvoll
>     Priority: Minor
>  Attachments: derby-938.diff, derby-938.html, derby-938.v2.diff, derby-938.v2.stat, derbyall_report.v2.txt,
get.html, get.v2.html
>
> ContextManagers are used extensively, particularly to get access to ExcutionContexts
and StatementContexts. Optimizing this access should improve overall performance. 

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


Mime
View raw message