Author: toad
Date: 2008-06-21 15:07:24 +0000 (Sat, 21 Jun 2008)
New Revision: 20576
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
Log:
Don't register all at once.
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-06-21 14:53:48 UTC (rev 20575)
+++ branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-06-21 15:07:24 UTC (rev 20576)
@@ -219,7 +219,10 @@
}, getter.getPriorityClass(), "Checking
datastore");
}
} else {
- finishRegister(req, persistent, onDatabaseThread, true);
+ // Pretend to not be on the database thread.
+ // In some places (e.g. SplitFileInserter.start(), we
call register() *many* times within a single transaction.
+ // We can greatly improve responsiveness at the cost of
some throughput and RAM by only adding the tags at this point.
+ finishRegister(req, persistent, false, true);
}
}