Discussion:
Compact object storage
(too old to reply)
Rajat K. Paharia
2005-06-13 02:17:24 UTC
Permalink
I'm saving actionscript objects on a remote server by
first serializing them with Sephiroth's Serializer
class (http://www.sephiroth.it/test/unserializer/),
and then sending them to the remote server in an XML
CDATA tag. The objects aren't being used on the remote
server, just stored as text strings and then returned
when I request them later. I'm also saving objects to
local disk in a similar manner (serialize, then save)
using mProjector. [I'm not using Shared Objects for
the local storage because I don't want the user to be
able to say "no".]

This all works great, but seems inefficient. Does
anyone know of:
a) A more efficient serializer - in terms of execution
speed and generated filesize?
b) Barring that, a quick way to compress a text
string, so that at least I can cut down on the size of
the data that I'm sending to the remote server or
saving to disk?

Any help would be much appreciated.

best, - rajat
http://www.rootburn.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
David Rorex
2005-06-13 06:23:50 UTC
Permalink
We made our own xml -> asobject and asobject -> xml converters, which
ended up being faster than serializer, and the xml was smaller than
the serialized text (strange, who'd have thought xml would be faster).
The advantage is that most of the xml parsing is done through flash's
built in xml parsing, which makes it faster than the serializer, which
has no native code. Might want to do something like this.

-David R
Post by Rajat K. Paharia
I'm saving actionscript objects on a remote server by
first serializing them with Sephiroth's Serializer
class (http://www.sephiroth.it/test/unserializer/),
and then sending them to the remote server in an XML
CDATA tag. The objects aren't being used on the remote
server, just stored as text strings and then returned
when I request them later. I'm also saving objects to
local disk in a similar manner (serialize, then save)
using mProjector. [I'm not using Shared Objects for
the local storage because I don't want the user to be
able to say "no".]
This all works great, but seems inefficient. Does
a) A more efficient serializer - in terms of execution
speed and generated filesize?
b) Barring that, a quick way to compress a text
string, so that at least I can cut down on the size of
the data that I'm sending to the remote server or
saving to disk?
Any help would be much appreciated.
best, - rajat
http://www.rootburn.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Flashcoders mailing list
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Loading...