openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-411) List.add(int,Object) is inefficient in default mappings
Date Mon, 22 Oct 2007 21:46:50 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Patrick Linskey updated OPENJPA-411:
------------------------------------

    Attachment: OPENJPA-411.patch

This patch might address the following suggestion from the mailing list:

"In the proxy list openjpa creates add a check to List.add(index, object)
whether index is equal to List.size() so it can use the same logic as add()"

I have not built a test case. Any volunteers?

> List.add(int,Object) is inefficient in default mappings
> -------------------------------------------------------
>
>                 Key: OPENJPA-411
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-411
>             Project: OpenJPA
>          Issue Type: Improvement
>    Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0
>            Reporter: Patrick Linskey
>             Fix For: 1.1.0
>
>         Attachments: OPENJPA-411.patch
>
>
> From users@openjpa.apache.org:
> When List.add(index, object) is being used
> OpenJPA sends the following sql statement, so the order of the elements can
> be built up from scratch:
> "Delete from RELATION_TABLE where ID = ?"
> In ms sql server this causes an exclusive lock on the entire table which of
> course easily introduces blocking issues (long running transactions having a
> shared lock or other client who like to insert objects in their list as
> well).
> List.add(Object) does not have this behaviour so when adding objects to the
> end of the list it is always better to use this method.

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