You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org> on 2006/02/09 06:57:58 UTC

[jira] Created: (DERBY-938) ContextManager needs to be optimized

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
 Assigned to: Dyre Tjeldvoll 
    Priority: Minor


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


[jira] Resolved: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]
     
Dyre Tjeldvoll resolved DERBY-938:
----------------------------------

    Resolution: Fixed

> 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
>      Fix For: 10.2.0.0
>  Attachments: derby-938.diff, derby-938.html, derby-938.v2.diff, derby-938.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Other Info: [Patch available]

> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment:     (was: derbyall_report.v2.txt)

> 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.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: derby-938.v3.diff
                derby-938.v3.stat
                derbyall_report.v3.txt

Attached a new patch (derby-938.v3.*) 

> 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, derby-938.v3.diff, derby-938.v3.stat, derbyall_report.v2.txt, derbyall_report.v3.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


[jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12367026 ] 

Dyre Tjeldvoll commented on DERBY-938:
--------------------------------------

Uhm, disregard item 3 in my previous comment. I misunderstood the question. The intention was that the underlying CtxStack would not be modified while iterating over it using getContextStack(). This should be documented in javadoc comment. Will fix.

> 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


[jira] Closed: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]
     
Dyre Tjeldvoll closed DERBY-938:
--------------------------------


> 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
>      Fix For: 10.2.0.0
>  Attachments: derby-938.diff, derby-938.html, derby-938.v2.diff, derby-938.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment:     (was: derby-938.stat)

> 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, get.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment:     (was: derbyall_report.txt)

> 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, get.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: derby-938.diff
                derby-938.stat
                derbyall_report.txt

Patch and results from running derbyall. Please review.

> 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.stat, derbyall_report.txt
>
> 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


[jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Daniel John Debrunner updated DERBY-938:
----------------------------------------

    Other Info:   (was: [Patch available])

 Patch derby-938.v3.diff - Committed revision 379265.

> 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.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Fix Version: 10.2.0.0

> 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
>      Fix For: 10.2.0.0
>  Attachments: derby-938.diff, derby-938.html, derby-938.v2.diff, derby-938.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment:     (was: get.xhtml)

> 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, get.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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Other Info:   (was: [Patch available])

> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment:     (was: derby-938.v2.stat)

> 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.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12365751 ] 

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

Since this is a critical area an overview of what changes you made would be really useful. Hard to tell what you approach was from just the patch.

> 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.stat, derbyall_report.txt
>
> 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


Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Dy...@Sun.COM.
>>>>> "MM" == Mike Matrigali <mi...@sbcglobal.net> writes:

    MM> Thanks for the description of the changes.  I have not looked at the 
    MM> patch, just the description so far.  so I have the following question:

Hi Mike, thanks for your feedback.

    MM> I know there is a single point (somewhere in the jdbc entry code) that 
    MM> is used to stop
    MM> multiple threads from accessing the same connection at the same time,
    MM> is it affected by your changes?
Hmm, not sure. 
I based my assumptions on the following comment in ContextManager.java: 

" * The first implementation of the context manager
 * assumes there is only one thread to worry about
 * and that the user(s) of the class only create one
 * instance of ContextManager."

    MM> Is it true that each context manager is a thread local variable?  With
    MM> connection pooling I know that a connection and it's associated context
    MM> manager can be executed on a different thread each time it enters
    MM> the jdbc stack.

I guess I should have explained where I got that from. In
ContextService.getCurrentContextManager() it looks like like it is...

That's how I interpret the comment in the beginning of 
ContextService.java, but maybe I misunderstanding something.

    MM> Also what kind of performance gains are you seeing from the change?

For a single client (single record select) I have seen from 6 to 9 % 
increase in throughput. For multiple client there is no visible
increase in throughput.

In the profiler I have seen that the methods in question use less
CPU. In particular, less CPU is spent in resetSavepoints() and
getContext(String). 

-- 
dt


Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Daniel John Debrunner <dj...@apache.org>.
Mike Matrigali wrote:

> Is it true that each context manager is a thread local variable?  With
> connection pooling I know that a connection and it's associated context
> manager can be executed on a different thread each time it enters
> the jdbc stack.

No the context manager is not a thread local variable. A thread local
variable is used to provide linkage from the current thread to the
correct context manager. This linkage only exists while the thread is
executing code using that context manager's connection in the derby
engine. It is set up upon entry into the JDBC driver and cleared upon
leaving the JDBC driver, for each significant method, e.g. rs.next(),
ps.executeQuery. There are performance gains to be had here as well, by
avoiding this context pushing/setup. Need more time for a full explaination.

And yes the asusmption/requirement is the context manager is single
threaded though not owned by a single thread.

Dan.

Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Dy...@Sun.COM.
>>>>> "DJD" == Daniel John Debrunner <dj...@apache.org> writes:

    DJD> Dyre.Tjeldvoll@Sun.COM wrote:
    >> Provide specalized accessor method to get the most recently pushed ExecutionContext and StatementContext.
    >> This lets clients of the ContextManager class access these Contexts
    DJD> directly without going through the HashMap.

    DJD> This does break the intended model of the ContextManager in that it is
    DJD> meant to be independent of other code in the system, like most of the
    DJD> services. Thus, in theory, a store system could be built without
    DJD> dragging in any language code, now such a system would drag in language
    DJD> code.

Thank you for looking at the patch and providing valuable and helpful
comments. You are absolutely right, of course, the ContextManager
should not have to pull in language code. 

This added dependency is ALMOST unnecessary (for the patch). Firstly,
the two added import statements can be removed if
getStatementContext() and getExecutionContext() are modified to return
a Context reference, (all the clients must then perform the casts
themselves, just like with getContext(String)).

Then we're only left with the equality-tests in pushContext(Context). The first
of these, which tests if the pushed Context is a StatementContext,
does not introduce a new dependency, as far as I can tell.
ContextManager.java already imports 
org.apache.derby.iapi.reference.Property
and the LANG_STATEMENT is located in 
org.apache.derby.iapi.reference.ContextId.

Then we're only left with that unfortunate dependency on 
org.apache.derby.iapi.sql.execute.ExecutionContext.CONTEXT_ID. Now, if
it would be OK to move this into
org.apache.derby.iapi.reference.ContextId.
as well, the problem would be solved.

So that brings up the question of why 
org.apache.derby.iapi.reference.ContextId 
currently has only two entries:

package org.apache.derby.iapi.reference;

public interface ContextId {


        String LANG_CONNECTION = "LanguageConnectionContext";
        String LANG_STATEMENT = "StatementContext";

}

While all the other 15 or so Context implementations define their
ContextId internally, e.g.:

org.apache.derby.iapi.sql.execute.ExecutionContext.java:

public interface ExecutionContext extends Context {

        /**
         * this is the ID we expect execution contexts
         * to be stored into a context manager under.
         */
        String CONTEXT_ID = "ExecutionContext";


Finally I would like to say that I can understand why people would
object to the propsed solution even if it is possible to remove the
dependency problem. I too think that having special methods for two
types of Contexts is ugly and clutters up the interface of
ContextManager, and I considered a couple of alternatives. 

The first was to re-write the whole ContextManager. I abandoned that
right away because I don't know the code well enough, and because the
patch would be huge. The second approach was to change the ContextId
from a String to an int. I abandoned that idea because it too would
have yielded a huge diff, and it would have made it more difficult to add new
Contexts (need to maintain all ids in a central locaton to make sure
the same number isn't used twice). While an array lookup probably is
faster than a hash table lookup one would still be doing unnecessary
work, and I found code where the ContextId is used outside the
ContextManager, and this code would have to change if the ContextIds aren't
Strings. 

So I'm not "attached" to this particular solution in any way, and if
anyone can propose a better solution to this problem I would love to
substitute that in the patch, and or omit this part altogether, if the
solution should be submitted as a separate patch (or part of another).

Sorry about the long email.

-- 
dt


Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Daniel John Debrunner <dj...@apache.org>.
Dyre.Tjeldvoll@Sun.COM wrote:

>>>>>>"DJD" == Daniel John Debrunner <dj...@apache.org> writes:
> 
>     DJD>    2) Consider splitting patches that do N things to fix an
>     DJD>       issue into N
>     DJD> independent patches if possible, or some number > 1. Some of
>     DJD> the changes in the patch are good by themselves, they don't
>     DJD> have to be linked with other changes that have modularity
>     DJD> concerns. E.g. replacing use of a synchronized collection
>     DJD> with an unsynchronized one. Incremental development is a
>     DJD> great model.
> 
> I don't mind splitting the patch into smaller pieces if that makes it
> easier to review it. Having said that, I don't really understand how
> the patch can be split in such a way that each sub-patch becomes
> meaningful by itself. All the ways of splitting the patch that I can
> think of seems to leave each part with "baggage" that only makes sense
> if viewed together with the other parts. But again, if it aids the
> reviewers... 

I don't mean to get people to split patches for no reason, but into
logical pieces. From a high level I can see that this patch has at least
two independent changes:

1) Change the base collection for the context manager from a
synchronized to an unsynchronized.

2) Optimize the context manager sor statement and execution contexts by
pushing language specific concepts into the ContextManager.

To my eyes:

1) seems like a good thing to do regardless of 2) and could be done
before or after 2). Truly independent.

2) on the other hand is taking a module that is meant to be independent
of the language layer and pushing language specific concepts into it.
This one seems like it could do with more discussion, is the context
manager really the correct place to solve this, maybe the system should
be reworked so this functionality is in the language connection context?

Dan.



Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Dy...@Sun.COM.
>>>>> "DJD" == Daniel John Debrunner <dj...@apache.org> writes:
    DJD>    2) Consider splitting patches that do N things to fix an
    DJD>       issue into N
    DJD> independent patches if possible, or some number > 1. Some of
    DJD> the changes in the patch are good by themselves, they don't
    DJD> have to be linked with other changes that have modularity
    DJD> concerns. E.g. replacing use of a synchronized collection
    DJD> with an unsynchronized one. Incremental development is a
    DJD> great model.

I don't mind splitting the patch into smaller pieces if that makes it
easier to review it. Having said that, I don't really understand how
the patch can be split in such a way that each sub-patch becomes
meaningful by itself. All the ways of splitting the patch that I can
think of seems to leave each part with "baggage" that only makes sense
if viewed together with the other parts. But again, if it aids the
reviewers... 

-- 
dt


Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Daniel John Debrunner <dj...@apache.org>.
Dyre.Tjeldvoll@Sun.COM wrote:

> Provide specalized accessor method to get the most recently pushed ExecutionContext and StatementContext.
> This lets clients of the ContextManager class access these Contexts
directly without going through the HashMap.

This does break the intended model of the ContextManager in that it is
meant to be independent of other code in the system, like most of the
services. Thus, in theory, a store system could be built without
dragging in any language code, now such a system would drag in language
code.

While that may not be a goal of Derby, starting to link independent
modules together starts down the the rocky path of losing all modularity.

Looking at this fix, and I have similar concerns about DERBY-210, I
would encourage folks to do two things:

   1) Come to the list early with your thoughts/direction on solving an
issue. This is open source development, the more eyes on a problem as
well as the code can only benefit Derby. Take advantage of the folks
that have been working on the product for nearly ten years, take
advantage of all the new eyes with fresh ideas we have.

   2) Consider splitting patches that do N things to fix an issue into N
independent patches if possible, or some number > 1. Some of the changes
in the patch are good by themselves, they don't have to be linked with
other changes that have modularity concerns. E.g. replacing use of a
synchronized collection with an unsynchronized one. Incremental
development is a great model.


Dan.




Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Dy...@Sun.COM.
>>>>> "MM" == Mike Matrigali <mi...@sbcglobal.net> writes:

    MM> Is it true that each context manager is a thread local variable?  With
    MM> connection pooling I know that a connection and it's associated context
    MM> manager can be executed on a different thread each time it enters
    MM> the jdbc stack.

It just occured to me that if multiple threads are allowed to access
the same ContextManager, then the current implementation is broken as
well. The current implementation of pushContext looks like this:

        public void pushContext(Context newContext)
        {
                checkInterrupt();

                String contextId = newContext.getIdName();

                Stack idStack = (Stack) ctxTable.get(contextId);

                // if the stack is null, create a new one.
                if (idStack == null)
                {
                        idStack = new Stack();
                        ctxTable.put(contextId,idStack);
                }

                // add to top of id's stack
                idStack.push(newContext);

                // add to top of global stack too
                holder.push(newContext);
        }

The method itself NOT synchronized, but it updates three fully synchronized
containers (ctxTable, idStack and holder), and there is nothing that
ensures that these three containers are changed together, or not at all.

-- 
dt

However, experience shows that for many people and many applications a
dose of paranoia is reasonable - Bjarne Stroustrup


Re: [jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by Mike Matrigali <mi...@sbcglobal.net>.
Thanks for the description of the changes.  I have not looked at the 
patch, just the description so far.  so I have the following question:

I know there is a single point (somewhere in the jdbc entry code) that 
is used to stop
multiple threads from accessing the same connection at the same time,
is it affected by your changes?

Is it true that each context manager is a thread local variable?  With
connection pooling I know that a connection and it's associated context
manager can be executed on a different thread each time it enters
the jdbc stack.

Also what kind of performance gains are you seeing from the change?


Dyre Tjeldvoll (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12365752 ] 
> 
> Dyre Tjeldvoll commented on DERBY-938:
> --------------------------------------
> 
> Hi Dan you are up early. You managed to put in your comment while I was attaching the description document. Does it address your concern?
> 
> 
>>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.stat, derbyall_report.txt
>>
>>ContextManagers are used extensively, particularly to get access to ExcutionContexts and StatementContexts. Optimizing this access should improve overall performance. 
> 
> 


[jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12365752 ] 

Dyre Tjeldvoll commented on DERBY-938:
--------------------------------------

Hi Dan you are up early. You managed to put in your comment while I was attaching the description document. Does it address your concern?

> 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.stat, derbyall_report.txt
>
> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: get.html

Spreadsheet as HTML, not XHTML.

> 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.stat, derbyall_report.txt, get.html, get.xhtml
>
> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-938:
--------------------------------

    Derby Categories: [Performance]

> ContextManager needs to be optimized
> ------------------------------------
>
>                 Key: DERBY-938
>                 URL: https://issues.apache.org/jira/browse/DERBY-938
>             Project: Derby
>          Issue Type: Improvement
>            Reporter: Dyre Tjeldvoll
>            Assignee: Dyre Tjeldvoll
>            Priority: Minor
>             Fix For: 10.2.1.6
>
>         Attachments: derby-938.diff, derby-938.html, derby-938.v2.diff, derby-938.v3.diff, derby-938.v3.stat, derbyall_report.v3.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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12366537 ] 

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

It's great that you are looking into this, one of my itches is better pure cpu performance for Derby.
Suggestions are:

1) As suggested before and I thought was part of your patch, using an unsynchronized collection.

2)  Use Integer for context identifiers instead of Strings. I once started some work towards this, moving
some context identifiers to a central class to ensure unique numeric identifiers.

I wonder if implementing these basic ideas will still show that some language specific changes are needed.
If they are let's tackle those separately.



> 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.stat, derbyall_report.txt, get.xhtml
>
> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: derby-938.v2.diff
                derby-938.v2.stat
                derbyall_report.v2.txt

Attached a new patch (derby-934.v2.*) that removes the getContext() optimization as suggested by the reviewers. A couple of things to note:

- The modification was not completely independent of the rest of the patch, so there were some additional changes, e.g. the traversal of the StatementContexts.
- I have not changed ContextIds from Strings to ints, for reasons explained in (http://article.gmane.org/gmane.comp.apache.db.derby.devel/14273)
- Even without this patch ContextManager depends on the language module in cleanupOnError(Throwable), which references org.apache.derby.iapi.reference.ContextId.LANG_CONNECTION (line 254), and org.apache.derby.iapi.reference.ContextId.LANG_STATEMENT (line 271). So the only added dependency introduced by the first version of the patch was that on ExecutionContexts.CONTEXT_ID, which could easily have been moved to  org.apache.derby.iapi.reference.ContextId as suggested in http://article.gmane.org/gmane.comp.apache.db.derby.devel/14273

Anyway, more work is needed to make ContextManager completely independent, as intended. 

> 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


Re: [jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by Dy...@Sun.COM.
Mike Matrigali <mi...@sbcglobal.net> writes:

> what do I need to look at an xhtml file on windows?

I'm sorry, I thought it worked in all browsers. The spreadsheet is in
StarOffice and I could either export it to pdf or xhtml. I tried xhtml
and could look at the file in my browser (firefox), so I chose that
over pdf which requires acroreader... I'll see if I can convert it
into another format.

-- 
dt


Re: [jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by Mike Matrigali <mi...@sbcglobal.net>.
what do I need to look at an xhtml file on windows?

Dyre Tjeldvoll (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]
> 
> Dyre Tjeldvoll updated DERBY-938:
> ---------------------------------
> 
>     Attachment: get.xhtml
> 
> Attaching a spreadsheet that shows the reduction in CPU resulting from optimizing getContext(String) for StatementContext and ExecutionContext. The load is  single record select, 100000 records in the table, pageCacheSize=10000, 10 sek warmup time, and 10 min running time. The measurements are obtained using Sun Performance Analyzer 7.4
> 
> While I have accepted the fact that the getContext(String) part of the patch will not make it into Derby, I would still like to document that there IS a perfomance issue  lurking here, and I would encourage "the folks that have been working on the product for nearly ten years" to think about how it can be fixed without violating other important design criteria.
> 
> 
>>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.stat, derbyall_report.txt, get.xhtml
>>
>>ContextManagers are used extensively, particularly to get access to ExcutionContexts and StatementContexts. Optimizing this access should improve overall performance. 
> 
> 


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: get.xhtml

Attaching a spreadsheet that shows the reduction in CPU resulting from optimizing getContext(String) for StatementContext and ExecutionContext. The load is  single record select, 100000 records in the table, pageCacheSize=10000, 10 sek warmup time, and 10 min running time. The measurements are obtained using Sun Performance Analyzer 7.4

While I have accepted the fact that the getContext(String) part of the patch will not make it into Derby, I would still like to document that there IS a perfomance issue  lurking here, and I would encourage "the folks that have been working on the product for nearly ten years" to think about how it can be fixed without violating other important design criteria.

> 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.stat, derbyall_report.txt, get.xhtml
>
> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Other Info: [Patch available]

> 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.v3.diff, derby-938.v3.stat, derbyall_report.v3.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


[jira] Commented: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-938?page=comments#action_12367023 ] 

Dyre Tjeldvoll commented on DERBY-938:
--------------------------------------

Thanks for your feedback.

- I'll fix the javadoc issues.

- I'll trust you on the "package protected" access issue, and fix that.

- About List and unmodifiableList: From a SW engineering point of view, I totally agree. However, my profiler indicates that this uses about 3 times more CPU. It's a tradeoff...

- Yes, voidArrayList_ should have been static.

- No the intention was that the List cannot be modified while it is traversed. I must admit that I don't understand why you would want to allow that (given that MT-access is ruled out). If you require the use of polymorphism to determine which elements should be removed from the container, would it not be better to mark those elements so that they get deleted when the iteration reaches their location in the container?

- Yes, I will add a comment about how the elements are ordered in the returned List.
 

> 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: get.v2.html

New spreadsheet (get.v2.html) that shows the effect of a new version of the patch which doesn't include the getContext() optimization. Seems like there is a substantial benefit to be had from just switching to a non-synchronized container, (note the large reduction in wait time). 

> 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, 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


[jira] Updated: (DERBY-938) ContextManager needs to be optimized

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-938?page=all ]

Dyre Tjeldvoll updated DERBY-938:
---------------------------------

    Attachment: derby-938.html

Inspired by Bryan Pendleton I have added a separate patch description document, but it is not quite up to his standards. 

> 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.stat, derbyall_report.txt
>
> 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