You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2009/07/01 17:39:47 UTC

[jira] Commented: (HARMONY-6200) [classlib][luni] - add cache for file's canonical path

    [ https://issues.apache.org/jira/browse/HARMONY-6200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726110#action_12726110 ] 

Tim Ellison commented on HARMONY-6200:
--------------------------------------

I took a look at the proposed patch, and it struck me that rather than writing our own expiring cache, we might want to pick-up a new dependency on the Google Collections Library [1], or at least steal some ideas :-)

[1] http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html

> [classlib][luni] - add cache for file's canonical path
> ------------------------------------------------------
>
>                 Key: HARMONY-6200
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6200
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Regis Xu
>         Attachments: HARMONY-6200.diff
>
>
> File.getCanonicalPath is very time cost and is heavily used by checking file permission. But in the most of cases, the canonical path is never change, it's better to cache them to avoid calculate every time. And I found RI also has cache: File.getCanonicalPath doesn't reflect change in file system real-time.

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