You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "T Jake Luciani (JIRA)" <ji...@apache.org> on 2010/11/30 19:48:11 UTC

[jira] Created: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Reduce byte array copies when using serialization/deserialization helper methods 
---------------------------------------------------------------------------------

                 Key: CASSANDRA-1792
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
            Reporter: T Jake Luciani
            Priority: Minor


>From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  

This can be changed to avoid making any copies. 

These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Commented: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965371#action_12965371 ] 

Jonathan Ellis commented on CASSANDRA-1792:
-------------------------------------------

Actually TIOStreamTransport.flush flushes the underlying DataOutputStream which is not what we want.

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Commented: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "T Jake Luciani (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965379#action_12965379 ] 

T Jake Luciani commented on CASSANDRA-1792:
-------------------------------------------

No, i don't think it is worth it.  I'd add it for 0.8/trunk

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Commented: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "T Jake Luciani (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965348#action_12965348 ] 

T Jake Luciani commented on CASSANDRA-1792:
-------------------------------------------

I assume the caller calls flush when it did something with the DataInputStream.

Internally, the transport just writes onto the DataInputStream...

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Commented: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965366#action_12965366 ] 

Jonathan Ellis commented on CASSANDRA-1792:
-------------------------------------------

it doesn't look like TBase.write calls flush, that is left to the caller (since presumably you could want to write multiple structs before flushing).  If so, we need to call protocol.getTransport().flush() here.

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Issue Comment Edited: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965372#action_12965372 ] 

Jonathan Ellis edited comment on CASSANDRA-1792 at 11/30/10 2:37 PM:
---------------------------------------------------------------------

Is this worth breaking network compatibility with rc1 [for range scan and index scan commands]

      was (Author: jbellis):
    Is this worth breaking network compatibility with rc1?
  
> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] [Commented] (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018611#comment-13018611 ] 

Jonathan Ellis commented on CASSANDRA-1792:
-------------------------------------------

is this still relevant?

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-1792.
---------------------------------------

    Resolution: Fixed

It's not worth breaking the protocol for this when we need to drop the use of Thrift entirely here (CASSANDRA-4247).

(The breakage is dropping the extra int that is no longer needed w/ this approach.)
                
> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965372#action_12965372 ] 

Jonathan Ellis commented on CASSANDRA-1792:
-------------------------------------------

Is this worth breaking network compatibility with rc1?

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Commented: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965345#action_12965345 ] 

Jonathan Ellis commented on CASSANDRA-1792:
-------------------------------------------

i don't know enough about thrift internals to tell if there is potential for unflushed data to be in the TProtocol/TIOStreamTransport pipeline this way.  if we can rule that out then it looks good to me.

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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


[jira] Updated: (CASSANDRA-1792) Reduce byte array copies when using serialization/deserialization helper methods

Posted by "T Jake Luciani (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

T Jake Luciani updated CASSANDRA-1792:
--------------------------------------

    Attachment: 1792_v1.txt

> Reduce byte array copies when using serialization/deserialization helper methods 
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1792
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1792
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: T Jake Luciani
>            Priority: Minor
>         Attachments: 1792_v1.txt
>
>
> From looking at CASSANDRA-1765 it seems FBUtilities serialize and deserialize methods unnecessarily make byte[] copies due to the way TSerializer is being used.  
> This can be changed to avoid making any copies. 
> These methods are only used in a couple serializers so not a big issue at this point. 

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