I have just completed a first implementation of the binary serializer/ deserializer. The interface is
(object->u8vector obj) (u8vector->object u8vect)
The space used is typically 30%-50% of the space used by the textual serializer (if you assume 1 character = 1 octet).
Here are the results of running the calculator web-continuation example with the new procedures. I have run the example two ways: with everything compiled, and with web-server.scm interpreted. This is on a 400 MHz PowerBook and without -D___SINGLE_HOST.
compiled interpreted
size of continuation after serialization and base64 encoding (octets) 840 38900
(u8vector->object cont) secs 0.000 0.021 (object->u8vector k) secs 0.003 0.042 base64 encoding/decoding secs 0.000 0.028
As you can see, the compiled version is really very fast, and you can barely see a delay in the browser. The interpreted version is slower but still acceptable, less than 1/10 of a second CPU time per interaction and about 2 seconds per interaction real-time when using Safari (I assume Safari spends most of this time processing the long URLs, which must be displayed in the address box... must be a dumb algorithm).
The binary serializer/deserializer and the updated web-server example will be part of the next beta release.
Marc
Afficher les réponses par date