Disclaimer: I don’t usually code packages with that much functions
Use the following code to generate a package source:
SELECT ‘CREATE OR REPLACE PACKAGE toad_test AS’ FROM dual UNION ALL
SELECT ’ FUNCTION f’ || ROWNUM || ’ RETURN NUMBER; – comment’ FROM dual CONNECT BY ROWNUM <= 5000 UNION ALL
SELECT ‘END;’ FROM dual
Executing the generated package with F9 seems to take approx. 10 seconds before actually compiling and another 5 seconds after compiling - the real compilation takes 2 seconds.
Reducing the package to “only” 1000 functions seems to reduce the total time to 1 second.
Should not be too relevant for packages with a sane size, but I thought I’d let you know in case there was a quick win that might also affect smaller packages.