Commit Graph

22 Commits

Author SHA1 Message Date
shendaras 9640e93895 imports
shendaras
2004-06-30 13:21:15 +00:00
jrandom 04373c5d1b just to be explicit about the max tunnel id 2004-06-29 19:25:23 +00:00
jrandom 5166eab5ee replaced double check locking (http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html) with the actual logic
- prepare the cache prior to use if you want to have the hash cache.
also fix the ejection policy to not clear the cache, but merely to remove sufficient values.
though maybe clearing the cache is the right thing to do so as to avoid ejection churn... hmm.
both of these fixes brought to you by the keen eyes of the one called mihi
2004-06-20 04:27:58 +00:00
jrandom 1679ba6719 so this String.getBytes(), its inefficient? you don't say...
(yeah, i know, this optimization takes advantage of the fact that the data in question uses single byte charsets)
2004-06-19 23:41:55 +00:00
jrandom 07fadd4a6c avoid string.getBytes like the plague 2004-06-19 23:40:03 +00:00
jrandom 57e1ff39e0 new method: cachedXor which, suprisingly, determines the xor of a hash against another hash, caching up to a certain number of values
currently uses an essentially random ejection policy, but this saves a lot of temporarly memory churn, since we xor many hashes against a router/destination's key
2004-06-19 23:35:43 +00:00
jrandom 51e259c198 avoiding the String.getBytes() since its a bitch on gc (measured for this situation) 2004-06-19 23:32:41 +00:00
jrandom de334b003d for safety, always create a session config with a destination 2004-06-19 23:30:57 +00:00
jrandom 95c33e88ed handle decompress error by propogating the IOE (thanks nickster for bug report) 2004-06-13 19:30:31 +00:00
jrandom 9f17654052 tuned to avoid expensive biginteger operation (well, not "expensive", but a lot more expensive than a few shifts)
when we need to debug, essentially assert the validity of the new tuned op, losing the performance benefit by duplicating the effort (to verify)
2004-05-18 18:33:37 +00:00
shendaras 292363eb65 imports (sorry, includes alphabetizing, wee)
(shendaras)
2004-05-17 03:38:53 +00:00
jrandom ff0023a889 big ol' memory, cpu usage, and shutdown handling update. main changes include:
* rather than have all jobs created hooked into the clock for offset updates, have the jobQueue stay hooked up and update any active jobs accordingly (killing a memory leak of a JobTiming objects - one per job)
* dont go totally insane during shutdown and log like mad (though the clientApp things still log like mad, since they don't know the router is going down)
* adjust memory buffer sizes based on real world values so we don't have to expand/contract a lot
* dont display things that are completely useless (who cares what the first 32 bytes of a public key are?)
* reduce temporary object creation
* use more efficient collections at times
* on shutdown, log some state information (ready/timed jobs, pending messages, etc)
* explicit GC every 10 jobs.  yeah, not efficient, but just for now we'll keep 'er in there
* only reread the router config file if it changes (duh)
2004-05-16 04:54:50 +00:00
jrandom b04512a4f6 add unique IDs to the threads for easier tracing 2004-05-04 04:46:04 +00:00
jrandom 70faecb8b5 handle the UnsignedInteger's new "IllegalArgumentException on negative" policy 2004-04-27 08:33:15 +00:00
jrandom e766a00a12 dont be such a reuse zealot and just fscking optimize the use case
(aka shift instead of creating heavyweight BigInteger objects)
plus some good ol' caching and gc churn reduction
2004-04-27 08:30:55 +00:00
jrandom ea03637ec1 cache the hashCode and getBytes data, significantly reducing the contention on these objects 2004-04-27 08:28:16 +00:00
jrandom 1ad6dde146 allow a whole set of OOM listeners on threads, not just one
cache the hash's base64 value too
use the context's logging more
logging updates
2004-04-26 00:57:10 +00:00
jrandom 393b1d7674 big ol' update to strip out the singletons, replacing them with
a rooted app context.  The core itself has its own I2PAppContext
(see its javadoc for, uh, docs), and the router extends that to
expose the router's singletons.  The main point of this is to
make it so that we can run multiple routers in the same JVM, even
to allow different apps in the same JVM to switch singleton
implementations (e.g. run some routers with one set of profile
calculators, and other routers with a different one).
There is still some work to be done regarding the actual boot up
of multiple routers in a JVM, as well as their configuration,
though the plan is to have the RouterContext override the
I2PAppContext's getProperty/getPropertyNames methods to read from
a config file (seperate ones per context) instead of using the
System.getProperty that the base I2PAppContext uses.
Once the multi-router is working, i'll shim in a VMCommSystem
that doesn't depend upon sockets or threads to read/write (and
that uses configurable message send delays / disconnects / etc,
perhaps using data from the routerContext.getProperty to drive it).
I could hold off until the sim is all working, but there's a
truckload of changes in here and I hate dealing with conflicts ;)
Everything works - I've been running 'er for a while and kicked
the tires a bit, but if you see something amiss, please let me
know.
2004-04-24 11:54:35 +00:00
human 66ad54fbf0 Made logs actually go through I2P logging system
(human)
2004-04-13 04:15:46 +00:00
shendaras 8a8e68146f beginning of format, updated imports. (shendaras) 2004-04-10 11:39:00 +00:00
jrandom be13c14376 javadoc cleanup to remove those damn warnings 2004-04-08 09:07:53 +00:00
jrandom e40b94c875 great renaming (cont.) 2004-04-08 04:48:39 +00:00