--nextPart1782446.HgIADprT8N
Content-Type: text/plain;
  charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Tuesday 31 January 2006 14:44, mathew wrote:
> > What do you mean by an API facade?
>
> Something that accepts calls via the old API, and translates them into
> appropriate calls into the new API.

I thought that's what you meant.  Unfortunately, that's not the API I'm 
talking about.

In REXML, currently, you can do this:

	el.attributes['someatt'] = "foo"
	el.attributes['someatt'] << "bar"
	el.attributes['someatt'] == "foobar"    # true

I can do this, because the attributes are being stored as Attribute objects, 
even though you get back String objects from attributes[].  To get the space 
saving, I'm only generating Attribute objects when the user makes an API call 
that returns an Attribute object; otherwise, I store the original String 
objects, which are less than 1/3 the size of an Attribute object.  Depending 
on the XML document, this can save a significant amount of memory.  The same 
trick will be applied to Text nodes, for even more savings.  On my average 
document survey, for example, I get about a 50% space improvement.

See:

http://www.germane-software.com/repos/rexml/branches/memory_attributes/benchmarks/memoryuse/stats.svg

for a *very* rough benchmark.  (trunk) is the current REXML memory use, (gns) 
is the optimized use, with just Attributes using optimized.

This isn't something I can put a faíÂde on -- at least, not without wrecking 
the memory gain.  As soon as I create a non-primitive object out of it, I 
lose the gain.

> Having seen the response to suggestions of incorporating versioning and
> RubyGems into Ruby, I think I could hazard a guess...

I didn't see anybody objecting to the versioning aspect of RubyGems; just the 
package management aspect of it.  In fact, I clearly remember some vocal 
insistence that the best thing would be to separate versioning from package 
management, where it doesn't belong... but that discussion is pass

-- 
--- SER

"As democracy is perfected, the office of president represents, 
more and more closely, the inner soul of the people.  On some 
great and glorious day the plain folks of the land will reach 
their heart's desire at last and the White House will be adorned 
by a downright moron."        -  H.L. Mencken (1880 - 1956)

--nextPart1782446.HgIADprT8N
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2-ecc0.1.6 (GNU/Linux)

iD8DBQBD4CPAP0KxygnleI8RAh8yAKCKC/BT3hZ8ZbWlYCVqdCQDzeC7pwCgo6zV
HjpwKHmXS6Zpd3bkSPXuzEgPQB
-----END PGP SIGNATURE-----

--nextPart1782446.HgIADprT8N--