large memory usage when of number parameters is very large

optimParallel creates a numeric array of size c(length(par), length(par)). This requires a considerable amount of memory if length(par) is very large. It should be easy to avoid that array and reduce the memory usage in that situation considerably. I will consider updating the software if I receive a good patch. Many thanks to Pedro for bringing up the issue.

I am not sure whether L-BFGS-B is suitable for problems with a very large number of parameters.

Edited by Florian Gerber