|
Re: [CDO] V3 a problem and inefficient [message #708842 is a reply to message #708387] |
Wed, 03 August 2011 07:21 |
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi David,<br>
<br>
Revision caches have been majorly reworked in 4.0:<br>
<br>
<img src="http://www.eclipse.org/forums/index.php?t=getfile&id=3552" alt=""><br>
<br>
There are now implementations particularly tuned for the different
repository modes (non-auditing, auditing, branching). Especially the
getObjectType() method has been optimized in all the concrete cache
types. For the branching cache it now looks like:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = -->
<!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3"
cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td nowrap="nowrap" align="left"
valign="top"> <code>
<font color="#ffffff"> </font><font color="#7f0055"><b>public </b></font><font
color="#000000">EClass getObjectType</font><font
color="#000000">(</font><font color="#000000">CDOID id</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>synchronized </b></font><font
color="#000000">(</font><font color="#000000">revisionLists</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font color="#000000">TypeAndRefCounter typeCounter = typeMap.get</font><font
color="#000000">(</font><font color="#000000">id</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>if </b></font><font
color="#000000">(</font><font color="#000000">typeCounter != </font><font
color="#7f0055"><b>null</b></font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>return </b></font><font
color="#000000">typeCounter.getType</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>return null</b></font><font
color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font></code>
</td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== -->
<br>
Does that help?<br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
<br>
Am 02.08.2011 20:47, schrieb David Wynter:
<blockquote cite="mid:j19g4d$5df$1@news.eclipse.org" type="cite">Hi,
<br>
<br>
I have a problem with this method in BranchRevisionCache
<br>
<br>
public EClass getObjectType(CDOID id)
<br>
{
<br>
synchronized (revisionLists)
<br>
{
<br>
for (Entry<CDOIDAndBranch, RevisionList> entry :
revisionLists.entrySet())
<br>
{
<br>
if (id.equals(entry.getKey().getID()))
<br>
{
<br>
RevisionList revisionList = entry.getValue();
<br>
EClass type = revisionList.getObjectType();
<br>
if (type != null)
<br>
{
<br>
return type;
<br>
}
<br>
}
<br>
}
<br>
}
<br>
<br>
return null;
<br>
}
<br>
<br>
Firstly it does not find my OID in there and late throws a
IllegalStateException, any ideas why this might be?
<br>
<br>
The second is that my model is about a 10th the size it will be
and the size of the RevisionLists is already 24371 in size. So you
loop through the entire set every time I save?
<br>
<br>
Thx.
<br>
<br>
David
<br>
</blockquote>
</body>
</html>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] V3 a problem and inefficient [message #709066 is a reply to message #708842] |
Wed, 03 August 2011 13:05 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
Hi Eike,
OK, that answers the question in terms of why I should upgrade for
performance reasons. But with deadlines to meet this is not something we
can commit to yet. Any idea how much effort there is to move to CDO 4
from CDO 3?
But it does not answer the question of why my OID are not in the
revisionLists? I'll try to reproduce the error with a smaller resource.
Is there any way to change my exported CDO resource then import it to
'fix' this problem?
Thx.
David
On 03/08/11 08:21, Eike Stepper wrote:
> Hi David,
>
> Revision caches have been majorly reworked in 4.0:
>
>
>
> There are now implementations particularly tuned for the different
> repository modes (non-auditing, auditing, branching). Especially the
> getObjectType() method has been optimized in all the concrete cache
> types. For the branching cache it now looks like:
>
> |*public *EClass getObjectType(CDOID id)
> {
> *synchronized *(revisionLists)
> {
> TypeAndRefCounter typeCounter = typeMap.get(id);
> *if *(typeCounter != *null*)
> {
> *return *typeCounter.getType();
> }
>
> *return null*;
> }
> }|
>
>
> Does that help?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 02.08.2011 20:47, schrieb David Wynter:
>> Hi,
>>
>> I have a problem with this method in BranchRevisionCache
>>
>> public EClass getObjectType(CDOID id)
>> {
>> synchronized (revisionLists)
>> {
>> for (Entry<CDOIDAndBranch, RevisionList> entry :
>> revisionLists.entrySet())
>> {
>> if (id.equals(entry.getKey().getID()))
>> {
>> RevisionList revisionList = entry.getValue();
>> EClass type = revisionList.getObjectType();
>> if (type != null)
>> {
>> return type;
>> }
>> }
>> }
>> }
>>
>> return null;
>> }
>>
>> Firstly it does not find my OID in there and late throws a
>> IllegalStateException, any ideas why this might be?
>>
>> The second is that my model is about a 10th the size it will be and
>> the size of the RevisionLists is already 24371 in size. So you loop
>> through the entire set every time I save?
>>
>> Thx.
>>
>> David
|
|
|
Re: [CDO] V3 a problem and inefficient [message #709240 is a reply to message #709066] |
Wed, 03 August 2011 17:07 |
|
Am 03.08.2011 15:05, schrieb David Wynter:
> Hi Eike,
>
> OK, that answers the question in terms of why I should upgrade for performance reasons. But with deadlines to meet this is not something we can commit to yet. Any idea how much effort there is to move to CDO 4 from CDO 3?
I guess not too much because most API changes are compatible for non-extenders.
>
> But it does not answer the question of why my OID are not in the revisionLists? I'll try to reproduce the error with a smaller resource.
And ideally with at least CDO 4.0 if you want to have it fixed ;-)
> Is there any way to change my exported CDO resource then import it to 'fix' this problem?
I don't think that was a problem with an export format.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
>
> Thx.
>
> David
> On 03/08/11 08:21, Eike Stepper wrote:
>> Hi David,
>>
>> Revision caches have been majorly reworked in 4.0:
>>
>>
>>
>> There are now implementations particularly tuned for the different
>> repository modes (non-auditing, auditing, branching). Especially the
>> getObjectType() method has been optimized in all the concrete cache
>> types. For the branching cache it now looks like:
>>
>> |*public *EClass getObjectType(CDOID id)
>> {
>> *synchronized *(revisionLists)
>> {
>> TypeAndRefCounter typeCounter = typeMap.get(id);
>> *if *(typeCounter != *null*)
>> {
>> *return *typeCounter.getType();
>> }
>>
>> *return null*;
>> }
>> }|
>>
>>
>> Does that help?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Am 02.08.2011 20:47, schrieb David Wynter:
>>> Hi,
>>>
>>> I have a problem with this method in BranchRevisionCache
>>>
>>> public EClass getObjectType(CDOID id)
>>> {
>>> synchronized (revisionLists)
>>> {
>>> for (Entry<CDOIDAndBranch, RevisionList> entry :
>>> revisionLists.entrySet())
>>> {
>>> if (id.equals(entry.getKey().getID()))
>>> {
>>> RevisionList revisionList = entry.getValue();
>>> EClass type = revisionList.getObjectType();
>>> if (type != null)
>>> {
>>> return type;
>>> }
>>> }
>>> }
>>> }
>>>
>>> return null;
>>> }
>>>
>>> Firstly it does not find my OID in there and late throws a
>>> IllegalStateException, any ideas why this might be?
>>>
>>> The second is that my model is about a 10th the size it will be and
>>> the size of the RevisionLists is already 24371 in size. So you loop
>>> through the entire set every time I save?
>>>
>>> Thx.
>>>
>>> David
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.03280 seconds