On Thu, 13 May 2004, why the lucky stiff wrote:

> Ara.T.Howard wrote:
> 
> >~ > ruby test.rb
> >pstore dump time @ 0.988970994949341
> >pstore load time @ 1.86728405952454
> >yamlstore dump time @ 42.3903992176056
> >yamlstore load time @ 47.6173989772797
> >  
> >
> First off, you aren't performing just a straight 'load' in the second of
> your paired tests.  Everytime a PStore transaction takes place, the file is
> loaded at the opening of the transaction and closed at the end.  
> Perhaps it would be worthwhile to check the hash of an object to see if it
> has changed?

yeah - i know that - i just wanted to test under actual usage scenario, which
would both be in a transation AND prohibit checking hash codes since i
wouldn't alreay have a handle on the object...  i just wanted to get a feel
for the performance with a list of about 50000 objects...

> So, it looks like the YAML emitter needs to be optimized.  The write
> operation is what is consuming time.  Right now, the YAML emitter consists
> largely of Ruby code.  I'll comb through it today and see what I can find.

i don't know if i'd say that - it's perfectly acceptable (to me at least) that
a text serialization format is simply not suitable for such tasks... it's
still great for all sorts of other things.  however, it __would__ be very
cool if i could use it: the project is a distributed job manager (grid) that
makes use of an on nfs disk priority job queue (pstore or yamlstore and
accessed safely by means of my Lockfile class) and n consumer processes
competing to run jobs from the queue.  the advantage of using yaml is that
standard tools (eg. grep) might be used to check for the status of jobs...
also it might make possible the construction of tool sets that utilize each
others stdout/in a bit easier, eg.

  rge_select --job_name=foobar | rge_alter --priority=42

-a
-- 
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL     :: http://www.ngdc.noaa.gov/stp/
| TRY     :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done 
===============================================================================