# Profiling Apply to Package Function

I'm using following code in Notebook and most of the time is spent on Apply[...] according to WorkBench Profiler. How can I improve performance?

I have also checked MainEvaluation:

SetSystemOptions[
"CompileOptions" -> {{"CompileReportExternal" ->
True}, {"AutomaticCompile" -> True}}]


usage in notebook:

Profile[Apply[PackageNameFunctionName, InputArguments, {1}]]


result in profiler:

Calls - Time - Evaluation

1 - 279.866 - Apply[PackageNameFunctionName, InputArguments, {1}]

12230734 - 14.215 - Compile::extscalar

-
It would be much more useful if you gave us some real sample data and the actual function you are profiling. It is impossible to answer your question as it stands. –  Leonid Shifrin Oct 25 at 11:30
Let me first chat with support, the package is few hundred lines of code. –  denfromufa Oct 25 at 15:23
The thing to do is to localize the problem as much as you can, and create a minimal example reproducing the problem. Surely no one here will be particularly happy if you dump a few hundred lines - long code. –  Leonid Shifrin Oct 25 at 17:29