comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Compile or not compile?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Compile or not compile? [message #43160 is a reply to message #42990] Mon, 21 March 2005 08:40 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 04 Mar 2005 03:42:50 -0800, m_schellens@hotmail.com wrote:

> 2. Files which have been added to IDL's path after it started. IDL
> scans its path at startup, and only files which exist at that time
> can be found automatically.
>
> Under linux at least this is not true. Here IDL always searches through
> the path again. Maybe it is different for the library path (the initial
> !PATH setting), I haven't checked it there.
> And what happens if !PATH is changed?

I suspect you are referring IDL<6.0, which was when path caching was
added to IDL. I think it must depend on whether your IDL is caching
its path, which it is by default starting at IDL 6.0. For me (under
Linux), newly created subdirectories and routines are not discovered:

The PATH_CACHE procedure is used to control IDL's use of the path
cache. By default, as IDL searches directories included in the
!PATH system variable for .pro or .sav files to compile, it creates
an in-memory list of all .pro and .sav files contained in each
directory. When IDL later searches for a .pro or .sav file, before
attempting to open the file in a given directory, IDL checks the
path cache to determine whether the directory has already been
cached. If the directory is included in the cache, IDL uses the
cached information to determine whether the file will be found in
that directory, and will only attempt to open the file there if the
cache tells it that the file exists. By eliminating unnecessary
attempts to open files, the path cache speeds the path searching
process.

The path cache is enabled by default, and in almost all cases its
operation is transparent to the IDL user, save for the boost in
path searching speed it provides. Because the cache automatically
adjusts to changes made to IDL's path, use of PATH_CACHE should not
be necessary in typical IDL operation. It is provided to allow
complete control over the details of how and when the caching
operation is performed.


The other thing to note is that the PATH is not cached on startup,
only after the first time it is read. So try something like:

IDL> .run file_in_my_path

create another_file_in_my_path.pro in the same location as
file_in_my_path.pro

IDL> .run another_file_in_my_path.pro

This will fail if the paths are cached.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: HIST_ND() used for resampling point data onto grid
Next Topic: C Alignment/IDL structures

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:17:36 PDT 2025

Total time taken to generate the page: 1.60161 seconds