You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "gabriele renzi (JIRA)" <ji...@apache.org> on 2009/12/11 09:51:18 UTC

[jira] Created: (CASSANDRA-627) use FastDateFormat instead of SimpleDateFormat

use FastDateFormat instead of SimpleDateFormat 
-----------------------------------------------

                 Key: CASSANDRA-627
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-627
             Project: Cassandra
          Issue Type: Improvement
         Environment: all
            Reporter: gabriele renzi
            Priority: Minor


FastDateFormat is thread safe and can be shared by different instances so we can avoid the overhead of recreating it every time. 
As in LogUtil we only rely on it for formatting it is a good fit. 

The usage in Circuit is already protected by a lock so probably no real need for this change.

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


[jira] Resolved: (CASSANDRA-627) use FastDateFormat instead of SimpleDateFormat

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

Jonathan Ellis resolved CASSANDRA-627.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9
         Assignee: gabriele renzi

Applied the -2 patch to contrib.  Removed LogUtil completely from main src/ instead of patching it with -1 (we've been quietly avoiding it for a while; thanks for the push to finally clean it out :)

> use FastDateFormat instead of SimpleDateFormat 
> -----------------------------------------------
>
>                 Key: CASSANDRA-627
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-627
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: all
>            Reporter: gabriele renzi
>            Assignee: gabriele renzi
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: CASSANDRA-627-1.patch, CASSANDRA-627-2.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> FastDateFormat is thread safe and can be shared by different instances so we can avoid the overhead of recreating it every time. 
> As in LogUtil we only rely on it for formatting it is a good fit. 
> The usage in Circuit is already protected by a lock so probably no real need for this change.

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


[jira] Updated: (CASSANDRA-627) use FastDateFormat instead of SimpleDateFormat

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

gabriele renzi updated CASSANDRA-627:
-------------------------------------

    Attachment: CASSANDRA-627-1.patch

uses thread safe shared FastDateFormat instance instead of a new  SimpleDateFormat  instance for each call in LogUtil.getTimestamp()

> use FastDateFormat instead of SimpleDateFormat 
> -----------------------------------------------
>
>                 Key: CASSANDRA-627
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-627
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: all
>            Reporter: gabriele renzi
>            Priority: Minor
>         Attachments: CASSANDRA-627-1.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> FastDateFormat is thread safe and can be shared by different instances so we can avoid the overhead of recreating it every time. 
> As in LogUtil we only rely on it for formatting it is a good fit. 
> The usage in Circuit is already protected by a lock so probably no real need for this change.

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


[jira] Updated: (CASSANDRA-627) use FastDateFormat instead of SimpleDateFormat

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

gabriele renzi updated CASSANDRA-627:
-------------------------------------

    Attachment: CASSANDRA-627-2.patch

uses FastDateFomat instead of SimpleDateFormat in contrib-Circuit, probably unnecessary due to the instance being being already shared and protected by a lock

> use FastDateFormat instead of SimpleDateFormat 
> -----------------------------------------------
>
>                 Key: CASSANDRA-627
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-627
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: all
>            Reporter: gabriele renzi
>            Priority: Minor
>         Attachments: CASSANDRA-627-1.patch, CASSANDRA-627-2.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> FastDateFormat is thread safe and can be shared by different instances so we can avoid the overhead of recreating it every time. 
> As in LogUtil we only rely on it for formatting it is a good fit. 
> The usage in Circuit is already protected by a lock so probably no real need for this change.

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


[jira] Commented: (CASSANDRA-627) use FastDateFormat instead of SimpleDateFormat

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

gabriele renzi commented on CASSANDRA-627:
------------------------------------------

I split the patch in two, as I believe one deserves inclusion while the other may be irreleveant. 
Also, all tests pass, but I have the feeling there should be a TimeZone and a Locale in the instantiation of DateFormat objects.

> use FastDateFormat instead of SimpleDateFormat 
> -----------------------------------------------
>
>                 Key: CASSANDRA-627
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-627
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: all
>            Reporter: gabriele renzi
>            Priority: Minor
>         Attachments: CASSANDRA-627-1.patch, CASSANDRA-627-2.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> FastDateFormat is thread safe and can be shared by different instances so we can avoid the overhead of recreating it every time. 
> As in LogUtil we only rely on it for formatting it is a good fit. 
> The usage in Circuit is already protected by a lock so probably no real need for this change.

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