You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Naumova Natalya (JIRA)" <ji...@apache.org> on 2007/08/24 15:25:36 UTC

[jira] Created: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

[startup] java.net.URL implementation without regex classes loading
-------------------------------------------------------------------

                 Key: HARMONY-4679
                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
             Project: Harmony
          Issue Type: Improvement
          Components: Classlib
            Reporter: Naumova Natalya 


When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Updated: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Naumova Natalya  updated HARMONY-4679:
--------------------------------------

    Attachment: java.net.URL.without.regex.patch

Simple comparing chars instead of previous
protocol.matches("\\A\\p{Alpha}[\\p{Alnum}+-.]*\\z")

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>         Attachments: java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Updated: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Alexey Petrenko updated HARMONY-4679:
-------------------------------------

    Attachment:     (was: java.net.URL.without.regex.patch)

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Commented: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

Posted by "Naumova Natalya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524445 ] 

Naumova Natalya  commented on HARMONY-4679:
-------------------------------------------

Verified, thanks. 

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>            Assignee: Tim Ellison
>         Attachments: harmony-4679.patch, java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Commented: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

Posted by "Naumova Natalya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524068 ] 

Naumova Natalya  commented on HARMONY-4679:
-------------------------------------------

Thanks Tim, I agree. Your patch seems to be more pretty.. And it gives the same result (removes regex and boost on HW). So, please, go ahead to commit it. As for '/' - sure, it's useless.

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>            Assignee: Tim Ellison
>         Attachments: harmony-4679.patch, java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Resolved: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Tim Ellison resolved HARMONY-4679.
----------------------------------

    Resolution: Fixed

Fixed in LUNI module at repo revision r571511.

Please verify.


> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>            Assignee: Tim Ellison
>         Attachments: harmony-4679.patch, java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Updated: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Naumova Natalya  updated HARMONY-4679:
--------------------------------------

    Attachment: java.net.URL.without.regex.patch

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>         Attachments: java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Updated: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Tim Ellison updated HARMONY-4679:
---------------------------------

    Attachment: harmony-4679.patch

Thanks for the patch Naumova, though I admit I found it a bit hard to follow the logic.  Based on your suggestion I implemented your suggestion as attached in harmony-4679.patch, please take a look and let me know if that achieves the same effect.  If so I'll commit it.

Reading a bit further down, if we have checked the protocol adheres to that given pattern, I wonder why we then check whether "protocol.indexOf('/') >= 0"  surely this can never be true?

Tim


> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>            Assignee: Tim Ellison
>         Attachments: harmony-4679.patch, java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Assigned: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Tim Ellison reassigned HARMONY-4679:
------------------------------------

    Assignee: Tim Ellison

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>            Assignee: Tim Ellison
>         Attachments: java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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


[jira] Closed: (HARMONY-4679) [startup] java.net.URL implementation without regex classes loading

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

Tim Ellison closed HARMONY-4679.
--------------------------------


Verified by Natalya

> [startup] java.net.URL implementation without regex classes loading
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4679
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4679
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Naumova Natalya 
>            Assignee: Tim Ellison
>         Attachments: harmony-4679.patch, java.net.URL.without.regex.patch
>
>
> When any class loads java.net.URL is used. However it loads ~60 classes from regex.jar. We can avoid this to re-write using of java.lang.String.matches method in net.URL, by using indexOf and substring instead of. Then no regex classes are loaded during the startup. Speedup on HelloWorld is ~7%.

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