Author: j16sdiz
Date: 2008-12-17 07:47:20 +0000 (Wed, 17 Dec 2008)
New Revision: 24423

Modified:
   trunk/plugins/XMLSpider/XMLSpider.java
Log:
commit less often - it's too slow

Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java      2008-12-17 07:36:00 UTC (rev 
24422)
+++ trunk/plugins/XMLSpider/XMLSpider.java      2008-12-17 07:47:20 UTC (rev 
24423)
@@ -259,7 +259,6 @@
                                        db.store(page);
                                }
                        }
-                       db.commit();
                }
        }
 
@@ -319,6 +318,7 @@
                                onFailure(e, g, ((MyClientCallback) 
g.getClientCallback()).page);
                        }
                }
+               db.commit();
        }
 
        private class MyClientCallback implements ClientCallback {
@@ -375,7 +375,8 @@
         * @param state
         * @param page
         */
-       public void onSuccess(FetchResult result, ClientGetter state, Page 
page) {
+       // TODO limit the number of processor running
+       protected void onSuccess(FetchResult result, ClientGetter state, Page 
page) {
                synchronized (this) {
                        while ((writingIndex || writeIndexScheduled) && 
!stopped) {
                                try {
@@ -439,7 +440,7 @@
                }
        }
 
-       public void onFailure(FetchException fe, ClientGetter state, Page page) 
{
+       protected void onFailure(FetchException fe, ClientGetter state, Page 
page) {
                Logger.minor(this, "Failed: " + page + " : " + state, fe);
 
                synchronized (this) {

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to