On 2 juil. 2014, at 17:24, Jeremy Evans <[email protected]> wrote:

> On Wednesday, July 2, 2014 8:18:40 AM UTC-7, Nicolas Goy wrote:
> I am doing something like: 
> 
> FIELDS = %w(size data data_string ...).map {|c| Sequel.qualify(:second_table, 
> c) } # FIELDS have about 50 entries 
> 
> fields = SecondTable.select(Sequel.function(:array_agg, 
> Sequel.pg_row(FIELDS))) 
> 
> MainTable.select_append(Sequel.as(fields, :all_fields)) 
> 
> This yield to a fast SQL query (50ms for the query), but sequel seems to 
> introduce a lot of overhead (about 300ms) to parse the result. 
> 
> Most of the time is spent in: Sequel::Postgres::PGRow::Splitter#parse (80%) 
> 
> I am wondering if I can do something about it or not. 
> 
> You can rewrite the parse method in C (which I'd consider including in 
> sequel_pg).
> 
> You could possibly try to optimize the ruby code.  However, the ruby code is 
> already written using StringScanner (itself implemented in C), so I don't 
> know how much more you could optimize it.
> 
> Thanks,
> Jeremy
> 

I'll see what I can do about it. This is not a top priority as I can minimize 
the issue with caching, but I'll have to address it one day or another.

--  
Nicolas Goy
Programmer
http://kuon.goyman.com

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to