Author: toad
Date: 2008-06-20 15:46:05 +0000 (Fri, 20 Jun 2008)
New Revision: 20528

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
Delete OffThreadCompressor. We run the actual compression separately.
Note that a bug in OTC was causing larger inserts to stall and not get 
compressed.

Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2008-06-20 15:35:55 UTC (rev 20527)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2008-06-20 15:46:05 UTC (rev 20528)
@@ -23,6 +23,7 @@
 import freenet.support.api.Bucket;
 import freenet.support.compress.Compressor;
 import freenet.support.io.BucketTools;
+import freenet.support.io.NativeThread;

 /**
  * Attempt to insert a file. May include metadata.
@@ -106,21 +107,9 @@
                Bucket data = block.getData();
                if(parent.persistent())
                        container.activate(data, 1); // Buckets will cascade if 
necessary
-               if(data.size() > COMPRESS_OFF_THREAD_LIMIT) {
-                       // Run off thread
-                       OffThreadCompressor otc = new OffThreadCompressor();
-                       context.mainExecutor.execute(otc, "Compressor for 
"+this);
-               } else {
-                       tryCompress(container, context);
-               }
+               tryCompress(container, context);
        }

-       private class OffThreadCompressor implements Runnable {
-               public void run() {
-                   freenet.support.Logger.OSThread.logPID(this);
-               }
-       }
-       
        void onCompressed(CompressionOutput output, ObjectContainer container, 
ClientContext context) {
                try {
                        onCompressedInner(output, container, context);


Reply via email to