You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Ittay Dror (JIRA)" <ji...@apache.org> on 2008/11/03 15:49:44 UTC

[jira] Created: (BUILDR-198) Filter#run always calls mkpath

Filter#run always calls mkpath
------------------------------

                 Key: BUILDR-198
                 URL: https://issues.apache.org/jira/browse/BUILDR-198
             Project: Buildr
          Issue Type: Bug
    Affects Versions: 1.3.4
            Reporter: Ittay Dror
             Fix For: 1.3.4


It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)

It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644765#action_12644765 ] 

Ittay Dror commented on BUILDR-198:
-----------------------------------

i don't know about the performance impact, but it is probably no more than checking if the directory exists

but the code immediately after is:
      return false if copy_map.empty?

so why not move mkpath after this check? (must the path exist even if empty?)

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644755#action_12644755 ] 

Assaf Arkin commented on BUILDR-198:
------------------------------------

We should take care of verbose.

Otherwise, what's the actual performance impact of calling mkpath? I don't want to introduce code to optimize something that's insignificant.

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644742#action_12644742 ] 

Assaf Arkin commented on BUILDR-198:
------------------------------------

What's the problem then?

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644749#action_12644749 ] 

Ittay Dror commented on BUILDR-198:
-----------------------------------

it's an unnecessary IO, and it outputs 'mkpath -p ...' to the screen which is just noise

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644776#action_12644776 ] 

Ittay Dror commented on BUILDR-198:
-----------------------------------

creating an empty target directory is an unnecessary performance impact, is it a must? if some other code relies on filter.target, can't the spec define that it must do File.exist(filter.target) prior to using it?

 

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644796#action_12644796 ] 

Ittay Dror commented on BUILDR-198:
-----------------------------------

on my system, re-creating 100 paths takes 5 milliseconds, not worth doing anything about.

so just the verbose thing then 



> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644768#action_12644768 ] 

Assaf Arkin commented on BUILDR-198:
------------------------------------

A filter always creates the target directory (if one is specified), see spec/core/common_spec.rb line 443.  It's easier to call mkpath than duplicate that functionality everywhere.

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Resolved: (BUILDR-198) Filter#run always calls mkpath

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

Assaf Arkin resolved BUILDR-198.
--------------------------------

    Resolution: Fixed

:verbose is now on only when running with --trace.

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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


[jira] Commented: (BUILDR-198) Filter#run always calls mkpath

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644793#action_12644793 ] 

Assaf Arkin commented on BUILDR-198:
------------------------------------

$ git blame -l lib/buildr/core/filter.rb -L 177,177
0379d903272f5cc3fbd336a106e910f909e6bdd5 (Assaf Arkin 2008-05-19 18:32:40 +0000 177)       mkpath target.to_s
$ git log 0379d903272f5cc3fbd336a106e910f909e6bdd5
commit 0379d903272f5cc3fbd336a106e910f909e6bdd5
Author: Assaf Arkin <as...@apache.org>
Date:   Mon May 19 18:32:40 2008 +0000

    Fixed: BUILDR-75 Filter now runs if there's a target directory, even if
    there are no source files to copy over, since everyone else just checks
    resources.target for existence before depending on it.
    
Issue number is wrong, but you can search JIRA and the mailing list for further discussion.

Once again, if you can't quantify the performance impact, there's no point in continuing this thread.

> Filter#run always calls mkpath
> ------------------------------
>
>                 Key: BUILDR-198
>                 URL: https://issues.apache.org/jira/browse/BUILDR-198
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> It does this even if it immediately returns. this does call (in linux) the mkdir system call (which returns EEXIST)
> It should also turn off verbose for it

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