Yes, indistinguishable difference in execution time. But 1:1 execution time is not the reason to use the project library. The reasons are, to start:
-
Functions in the project library are re-usable. When carefully designed, they can be used in many parts of your application.
-
Functions in the project library can re-use constants and cached values that are stored in named variables outside the
def. This does reduce execution time, as those variables persist from call to call. -
Functions in the project library are maintenance-friendly, particularly that they are stored in the filesystem in plain text as
code.py, and are therefore very friendly to source code control, likegit.
The sort of callout to a library function shown in your comment #13 could be a one-liner, like so:
return functions.tagListGetDetails(self.view.params.tagList)
That is a good habit.