Author: jflesch
Date: 2006-10-28 23:07:29 +0000 (Sat, 28 Oct 2006)
New Revision: 10729

Modified:
   trunk/apps/Thaw/src/thaw/plugins/index/Index.java
Log:
Start directly index downloading without passing by the queue

Modified: trunk/apps/Thaw/src/thaw/plugins/index/Index.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Index.java   2006-10-28 20:39:24 UTC 
(rev 10728)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Index.java   2006-10-28 23:07:29 UTC 
(rev 10729)
@@ -277,7 +277,7 @@

        public void updateFromFreenet(int rev) {
                FCPClientGet clientGet;
-               
+
                Logger.info(this, "Getting lastest version ...");

                String key;
@@ -301,13 +301,20 @@
                }

                Logger.info(this, "Key asked: "+key);
+

                clientGet = new FCPClientGet(key, 2, 2, false, -1, 
System.getProperty("java.io.tmpdir"));
                this.transfer = clientGet;
                clientGet.addObserver(this);
-               
-               this.queueManager.addQueryToThePendingQueue(clientGet);

+               /*
+                * These requests are usually quite fast, and don't consume a 
lot
+                * of bandwith / CPU. So we can skip the queue and start 
immediatly
+                * (and like this, they won't appear in the queue)
+                */
+               //this.queueManager.addQueryToThePendingQueue(clientGet);
+               clientGet.start(queueManager);
+
                this.setChanged();
                this.notifyObservers();
        }


Reply via email to