On Thu, Jun 26, 2008 at 11:43 PM,  <toad at freenetproject.org> wrote:
> Author: toad
> Date: 2008-06-26 15:43:14 +0000 (Thu, 26 Jun 2008)
> New Revision: 20750
>
> Modified:
>   branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java
> Log:
> Don't activate and deactivate parent here
>

activate() is very cheap on already activated object..


> Modified: 
> branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java
> ===================================================================
> --- 
> branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java  
>       2008-06-26 15:33:10 UTC (rev 20749)
> +++ 
> branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java  
>       2008-06-26 15:43:14 UTC (rev 20750)
> @@ -401,8 +401,8 @@
>        }
>
>        public void start(ObjectContainer container, ClientContext context) 
> throws InsertException {
> +               // Always called by parent, so don't activate or deactivate 
> parent.
>                if(persistent) {
> -                       container.activate(parent, 1);
>                        container.activate(parent.parent, 1);
>                }
>                if (logMINOR)
> @@ -473,8 +473,6 @@
>                if (finished) {
>                        parent.segmentFinished(this, container, context);
>                }
> -               if(persistent)
> -                       container.deactivate(parent, 1);
>        }
>
>        public void onDecodedSegment(ObjectContainer container, ClientContext 
> context, FECJob job, Bucket[] dataBuckets, Bucket[] checkBuckets, 
> SplitfileBlock[] dataBlockStatus, SplitfileBlock[] checkBlockStatus) {} // 
> irrevelant
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>

Reply via email to