In a simulation code I use "module-factory" concepts (where a module has a proc; the proc in turn returns another module that has all the procs one wants) a fair bit to keep the code readable and maintainable.
At this point I have the code mostly doing what I want it to, but the run time could be improved (read: I want it to go faster). So I have started working with CodeTools:-Profiling. Quickly I am running into the Profile() function apparently not being able to deal with my generated procedures.
Is there a way out? In other locations I read about procs to be profiled having to be in a Maple library; this is the case for my routines (it all is in a big module with procs, submodules etc.). I'd rather not rewrite the code extensively just to allow profiling (in particular I would not really like to abandon the module-factory scheme), but of course I can do some modification.