Private procedure performance

Posted by ijazbof on 21-Jan-2010 13:20

Hi:

I have read the PROGRESS documentation regarding PRIVATE procedures and all I found was this:

http://communities.progress.com/pcom/docs/DOC-15896 "Miscellaneous New Features  PRIVATE Keyword In Version 9, if a procedure defines internal procedures and  user-defined functions with the PRIVATE option, other procedures cannot invoke  them, and they do not appear on the list provided by the defining procedure's  INTERNAL-ENTRIES attribute or GET-SIGNATURE method. If another procedure tries  to invoke an internal procedure or user-defined function defined with the  PRIVATE option, Progress responds as if the internal procedure or user-defined  function does not exist. A procedure might define internal procedures and  user-defined functions with the PRIVATE option if, for example, they represent  encapsulated objects that other procedures must not invoke directly."

and http://progress.atgnow.com/esprogress/resultDisplay.do?gotoLink=549&docType=1000&contextId=36475%3A549.582%2C3433.3454%2C589.607&clusterName=CombinedCluster&contentId=e6b9338c-b57b-4e58-a81b-0c5c61853f62&responseId=25d08d682f97570d%3Ab60b93%3A126505fa044%3A7415&groupId=1&answerGroup=7&score=814&page=https%3A%2F%2Fprogress.atgnow.com%2Fesprogress%2Fdocs%2FProgress%2Fesupport.progress.com%2FEDocHTML%2FOpenEdge%2F10.1B%2Fdvref%2Fdvref-14-11.html&result=6&excerpt=PROCEDURE+proc-name+%5B+PRIVATE+%5D+%3A&resultType=5000#Goto549

"

PRIVATE

Indicates the following about the internal procedure:
      • That it cannot be invoked from an external procedure—that is, from a procedure file external to the current procedure file.
      • That the INTERNAL-ENTRIES attribute on the procedure that defines it does not provide its name (unless the procedure that defines it is the current procedure file).
      • That the GET-SIGNATURE method on the procedure that defines it does not provide its signature (unless the procedure that defines it is the current procedure file).

"

Now, what I would like to know is:

Is there an improvement to the performance of the programs that include procedures with this keyword versus an identical procedure with no PRIVATE keyword present? This improvement being either speed, or less memory usage or both or any other advantage not mentioned already in the documentation I found?

Thanks in advance

Hugo Alberto

All Replies

Posted by Thomas Mercer-Hursh on 21-Jan-2010 14:22

I can't imagine there being any impact on performance whatsoever.  It is just an early, very basic way of trying to control the interface which a PP presents to the world.  A private procedure is simply one that shouldn't be run from outside because its purpose is supporting other procedures in that PP.  In many cases, they depend on context not available outside the PP.  It's primary utility is helping the programmer to distinquish between what is exposed for use by others and what is not.

This thread is closed