You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Sai Pullabhotla (JIRA)" <ji...@apache.org> on 2008/12/03 23:05:44 UTC

[jira] Created: (FTPSERVER-229) MFMT Command - Code Enhancement

MFMT Command - Code Enhancement
-------------------------------

                 Key: FTPSERVER-229
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
             Project: FtpServer
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.0.0-M3
            Reporter: Sai Pullabhotla
             Fix For: 1.0.0-M4


MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
its configuration should be moved to static block for performance and to reduce object creations. 


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


Re: [jira] Commented: (FTPSERVER-229) MFMT Command - Code Enhancement

Posted by David Latorre <dv...@gmail.com>.
2008/12/4 Sai Pullabhotla (JIRA) <ji...@apache.org>

>
>    [
> https://issues.apache.org/jira/browse/FTPSERVER-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653293#action_12653293]
>
> Sai Pullabhotla commented on FTPSERVER-229:
> -------------------------------------------
>
> Nicklas,
>
> That's a very valid point. I did not even think about it. I guess, it
> could stay the way it is or if we want, we can create a
> SynchronizedSimpleDateFormat class using the Deligator pattern, but
> synchronize some methods like format and parse. Surely, the
> synchronization would have a performance hit too.  We need to think
> some more about this.
>

 Yeah I was nearly caught here too. Anyway since I had already ported the
DateFormat to DateUtils.java when I noticed the synchronization issue, I
think we can leave it there so it will be easier to port if we decided to
synchronize the method. I don't know if that sohuld be necessary though.
Synchronized/new object: what do you like better?



>
> Thanks.
>
> Sai Pullabhotla
> Phone: (402) 408-5753
> Fax: (402) 408-6861
> www.jMethods.com
>
>
>
>
> On Thu, Dec 4, 2008 at 5:37 AM, Niklas Gustavsson (JIRA)
>
>
> > MFMT Command - Code Enhancement
> > -------------------------------
> >
> >                 Key: FTPSERVER-229
> >                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
> >             Project: FtpServer
> >          Issue Type: Improvement
> >          Components: Core
> >    Affects Versions: 1.0.0-M4
> >            Reporter: Sai Pullabhotla
> >            Assignee: David Latorre
> >             Fix For: 1.0.0-RC1
> >
> >
> > MFMT Command - in the source code for this command (MFMT.java), the
> DateFormat and
> > its configuration should be moved to static block for performance and to
> reduce object creations.
>
>   --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Commented: (FTPSERVER-229) MFMT Command - Code Enhancement

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653265#action_12653265 ] 

Niklas Gustavsson commented on FTPSERVER-229:
---------------------------------------------

Be aware that SimpleDateFormat is not thread-safe and thus can not simply be set as static (this was the reason I did it as a variable). One way is to store a ThreadLocal of SimpleDateFormat instances.

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Assigned: (FTPSERVER-229) MFMT Command - Code Enhancement

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

David Latorre reassigned FTPSERVER-229:
---------------------------------------

    Assignee: David Latorre

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M3
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-M4
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Commented: (FTPSERVER-229) MFMT Command - Code Enhancement

Posted by "Sai Pullabhotla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653293#action_12653293 ] 

Sai Pullabhotla commented on FTPSERVER-229:
-------------------------------------------

Nicklas,

That's a very valid point. I did not even think about it. I guess, it
could stay the way it is or if we want, we can create a
SynchronizedSimpleDateFormat class using the Deligator pattern, but
synchronize some methods like format and parse. Surely, the
synchronization would have a performance hit too.  We need to think
some more about this.

Thanks.

Sai Pullabhotla
Phone: (402) 408-5753
Fax: (402) 408-6861
www.jMethods.com




On Thu, Dec 4, 2008 at 5:37 AM, Niklas Gustavsson (JIRA)


> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Resolved: (FTPSERVER-229) MFMT Command - Code Enhancement

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

David Latorre resolved FTPSERVER-229.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.0.0-M4)
                   1.0.0-RC1

Fix will be provided for 1.0.0-RC1. 

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M3
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Commented: (FTPSERVER-229) MFMT Command - Code Enhancement

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653935#action_12653935 ] 

Niklas Gustavsson commented on FTPSERVER-229:
---------------------------------------------

I've commited a change that use a static ThreadLocal for this purpose. I think we can close this issue

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Updated: (FTPSERVER-229) MFMT Command - Code Enhancement

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

Niklas Gustavsson updated FTPSERVER-229:
----------------------------------------

    Affects Version/s:     (was: 1.0.0-M3)
                       1.0.0-M4

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Reopened: (FTPSERVER-229) MFMT Command - Code Enhancement

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

David Latorre reopened FTPSERVER-229:
-------------------------------------


We should see if we want to fix this , accessing DateFormat  in a thread-safe way. Sorry for 'resolving' issues too soon (and not committing them!).

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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


[jira] Closed: (FTPSERVER-229) MFMT Command - Code Enhancement

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

Niklas Gustavsson closed FTPSERVER-229.
---------------------------------------

    Resolution: Fixed

Closing, I think this is now fixed.

> MFMT Command - Code Enhancement
> -------------------------------
>
>                 Key: FTPSERVER-229
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-229
>             Project: FtpServer
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Sai Pullabhotla
>            Assignee: David Latorre
>             Fix For: 1.0.0-RC1
>
>
> MFMT Command - in the source code for this command (MFMT.java), the DateFormat and
> its configuration should be moved to static block for performance and to reduce object creations. 

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