Modified the way objects are decoded to CLOS objects in the absence of prototypes.
Modified the way objects are decoded to CLOS objects in the absence of prototypes.

Originally, an anonymous singleton class was created for each unprototyped
object received by the decoder.  It turned out that this approach can lead to
strong degradation of performance.  E. g., OpenMCL employs an optimization
technique which includes caching methods of generic function based on the
classes of their arguments.  If classes proliferate beyond measure, the effect
of caching is the opposite of intended.

The new approach is to keep a table of classes (mapping from lists of classes
such as prototyped lispSuperclasses to anonymous fluid classes).  For every
received unprototyped object we either create a new entry or, if a class with
exactly the same list of superclasses is already in the table, update it to
include the new slots.  Anyway, a typical remote party (such as a web app)
can be expected to have only a few different object configurations.

The code is now much cleaner and includes a rounded-up interface to fluid
classes.  A lot of docstrings has been added as well.

darcs-hash:20090122113959-35485-f8c70831cdf301fc2608a0dece1df2062dad2dbe.gz

hankhero/cl-json