Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > YAML::Store - fast read, slow write

Reply
Thread Tools

YAML::Store - fast read, slow write

 
 
Bill Kelly
Guest
Posts: n/a
 
      07-21-2005
Hi,

I have a 635K YAML file I'm using as a flat file database
with YAML::Store. It's taking about 13 seconds to do a
#transaction on the file - but I was surprised to see that
the file is loaded in 1 second, and that it takes 12 seconds
to write the file back out.

I installed syck-0.55 in case that might help, but the
timing seems about the same. (Dunno exactly which syck
version I had installed previously - it's whatever was
built with stock 1.8.2.)

Anyway I was wondering if the slow write speed was a known
issue / expected behavior? I'm running it with -rprofile,
but it's still going... <grin> I'll check the results of
that when I get up tomorrow....


Regards,

Bill



 
Reply With Quote
 
 
 
 
Mauricio Fernández
Guest
Posts: n/a
 
      07-21-2005
On Thu, Jul 21, 2005 at 04:45:22PM +0900, Bill Kelly wrote:
> I have a 635K YAML file I'm using as a flat file database
> with YAML::Store. It's taking about 13 seconds to do a
> #transaction on the file - but I was surprised to see that
> the file is loaded in 1 second, and that it takes 12 seconds
> to write the file back out.

[...]
> Anyway I was wondering if the slow write speed was a known
> issue / expected behavior? I'm running it with -rprofile,
> but it's still going... <grin> I'll check the results of
> that when I get up tomorrow....


syck's emitter is known to be slow.

PS: it doesn't really help you in this case, but next
time you want to profile something, take a look at
http://raa.ruby-lang.org/project/ruby-prof/ which is massively faster
than the set_trace_func-based one.

--
Mauricio Fernandez


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: slow slow slow! Expert lino fitter Computer Support 5 12-12-2008 04:00 PM
Re: slow slow slow! General Patron Computer Support 0 12-11-2008 11:01 PM
Re: slow slow slow! chuckcar Computer Support 0 12-10-2008 11:25 PM
Re: slow slow slow! Beauregard T. Shagnasty Computer Support 2 12-10-2008 09:03 PM
Re: slow slow slow! Expert lino fitter Computer Support 0 12-10-2008 02:33 PM



Advertisments