I am hoping someone can explain how Universe determines when, and from where, to load object code.
What does Universe do when it has to call a subroutine. My experiments point to using a globally catalog subroutine as being faster than a locally catalog routine but I don't see why.
I understand that with a local catalog the system must read the VOC to find the object location then load the object code, but once it is loaded it remains in memory for the duration of the program. Why would this be faster than a global catalog which must effectively do a similar thing. And regardless of how it is found and loaded, thereafter, the object remains in memory and there should be no difference in the cost of each subsequent call. Yet my testing shows a significant performance gain using a globally catalog subroutine.
I believe a globally cataloged subroutine loaded to shared memory so multiple processes execute the same object code but each with there own memory space. Is that correct?
What is the benefit of adding a subroutine to the SHM.TO.LOAD file? Does this just reduce the cost of the initial load the first time a subroutine is called?
Ultimately I'm trying to determine if our frequently called subroutines (millions of calls per day responding to requests via Web DE) should be put in to the global catalog.
Doing so would seem to come with the once-off cost of changing our code from "CALL MYSUB" to "CALL *MYSUB" in order to invoke the globally cataloged code. Is there a way around having to make this change?