On Saturday 05 June 2010 04:28:55 Ximin Luo wrote: > Hey toad, > > Could you please explain the following: > > - SkelTreeMap: What are you trying to do with it? None of the changes make any > functional difference AFAICS. There's no point "encapsulating" SkelValue stuff > into separate methods; that class is used only within SkelTreeMap.
I wanted to ensure that we always maintain consistency (e.g. w.r.t. isLoaded). This is the usual reason for encapsulation. However, this was added during debugging, wierd things were happening; if you want to change it back then do so. > > - SkelBTreeMap: In update(), what did you do to the main loop? Ummm, several things? The most obvious thing I did was to create a wrapper method to deal with overflow - stuff that doesn't fit in a node. Other stuff includes processing the queued data in the right order so we don't generate load until we've dealt with as much as possible. Much of that was designed to ensure, and enable, finite queue lengths, to avoid OutOfMemory / constant Full GC's. > > - Notifier: what's it for? Avoiding all the 1 second Thread.sleep()'s. > > - ObjectProcessor: What's the new stuff (capacity, etc) you've added for? Detecting overflow and thus preventing deadlocks. Look at the call stack. > > How is performance now? If it's still a problem, then it'll probably be better > to make the async design changes I mentioned, rather than repeatedly add lots > of hacks that bloat the code. (For example, data structures classes shouldn't > need to have arbitrary queue limits hard-coded into them.) That would be great but I want to ship a working system ASAP. IMHO performance is reasonable at this point. I have still had some OOMs and other wierd errors (e.g. the Packer stuff recently), but I'm hoping to ship this on Monday. > > Some minor changes that I will be making anyways: > > 1. adding a Objects.idString() instead of using System.identityHashcode in 3 > separate classes to do the same thing. Where have you used Object.toString() > implicitly? I only know of "+this+", and I'll be replacing those snippets with > "+Objects.idString(this)+". IMHO it is cleaner to have a proper toString(), and third party code will NEVER rely on it > > 2. re-implementing SkelBTreeMap.keySetAutoDeflate() to NOT DUPLICATE CODE. > Instead, BTreeMap.entrySet() will use a separate BTreeIterator class with > parameters/hooks(onDscInto,onAscFrom)/etc which SkelBTreeMap can use Sounds good. > > 3. finding a better alternative to TaskAbortExceptionConverter and > ExceptionConverter which iirc were temporary hacks anyways. I doubt that there is one, unless you want to store the RuntimeException's. > > Ximin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20100605/02c4a752/attachment.pgp>
