[ 
https://issues.apache.org/jira/browse/THRIFT-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Duxbury updated THRIFT-246:
---------------------------------

    Attachment: thrift-246.patch

This does the trick. It's as much as 10% faster, though it's still pure method 
call overhead. We can get rid of this method if we ever switch to a proper 
inheritance structure or use more generated code.

> Make #struct_fields part of the generated code rather than using reflection
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-246
>                 URL: https://issues.apache.org/jira/browse/THRIFT-246
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby), Library (Ruby)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>         Attachments: thrift-246.patch
>
>
> Instead of using Ruby reflection to get to the FIELDS hash, let's make it 
> part of the generated struct code. This way, we can avoid the overhead of 
> using reflection to get the object every time it's used. It's used very 
> frequently, so it adds a pretty respectable amount of overhead to 
> serialization/deserialization operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to