If I have a situation where file A imports files B and C, and files B and C both import file D is that going to cause any sort of conflict when a call is made to a function in file D?
No. Question: If file A imports file B and file B imports file C, does file C get re-imported every time the function in file B is called? If so is there any potential conflict there, and how much will this impact overall efficiency? Answer: No, functions in file C do not get re-imported every time the function in file B is called. However, we should point out that file C will, in fact, be re-imported every time. Now, none of the functions in it will get imported, but the file will be retrieved and parsed each time you try to import something from it. Depending on how big this file is, and how often you are calling the function which imports it, you might either set a STAF variable (with the job number somewhere in it) that you can retrieve across function calls, or have the importing function use “global” scope and set a STAX variable that indicates the import has already been done. You can see this for yourself if you’d like by looking at STAXResult after each
Related Questions
- If I have a situation where file A imports files B and C, and files B and C both import file D is that going to cause any sort of conflict when a call is made to a function in file D?
- I need to batch import multiple files with tab separated data. How can I do that with the File plug-in?
- Nightingale only imports MIDI files of the type 1 format. How can I import a type 0 MIDI file?