db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2884) CtxStack should only create unmodifiable view once per instance
Date Sat, 30 Jun 2007 18:29:04 GMT

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

Knut Anders Hatlen commented on DERBY-2884:
-------------------------------------------

Currently, ContextManager.getContextStack() is only called on the statement stack, so creating
one for the language connection stack too would waste a couple of bytes per connection. That
shouldn't be much of a problem unless you're really tight on memory, though, so I don't mind
changing it if you'd prefer that approach.

> CtxStack should only create unmodifiable view once per instance
> ---------------------------------------------------------------
>
>                 Key: DERBY-2884
>                 URL: https://issues.apache.org/jira/browse/DERBY-2884
>             Project: Derby
>          Issue Type: Improvement
>          Components: Performance, Services
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: ctxstack.diff
>
>
> Each time a transaction is committed or aborted, GenericLanguageConnectionContext.resetSavepoints()
goes through the stack of statement contexts and invokes resetSavePoint() on them. Instead
of traversing the list in the CtxStack object directly, it fetches a read-only view of the
list. Since the lifetime of a CtxStack object and the list within it can span multiple transactions,
the read-only view only needs to be created the first time CtxStack.getUnmodifiableList()
is called on an object.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message