Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Is it possible to localize the stat/lstat cache?

by AnomalousMonk (Archbishop)
on Apr 17, 2015 at 15:28 UTC ( [id://1123778]=note: print w/replies, xml ) Need Help??


in reply to Is it possible to localize the stat/lstat cache?

The actual calls to these other functions are uncommon in frequency ..., but there are many places in the main function that might need to call them.

If the other functions are infrequently called, what difference does it really make how many places exist in the program from which the calls might be made? To give an extreme example, if half the statements in a program are die statements, but it can be shown that all these statements are in dead code branches, what cumulative effect do these die statements have? None.

Why worry about this? Or do I simply misunderstand the problem?


Give a man a fish:  <%-(-(-(-<

Replies are listed 'Best First'.
Re^2: Is it possible to localize the stat/lstat cache?
by bounsy (Acolyte) on Apr 17, 2015 at 15:42 UTC

    The problem is that the function needs to continue after these calls to the other functions. They are exception cases (in the sense that they are rare), but they aren't branches that don't need to return and continue from there.

    For example (where ... could be any set of tests, including one or more -X _ tests, and each function call could potentially need to use stat/lstat in it):

    if (...) { function1(); } if (...) { function2(); } if (...) { function3(); } # etc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123778]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found