I would like to further enhance the efficiency of an existing Erlang program. First I would like to identify bottlenecks and then decide on where to further optimize.
I have tryed fprof
, but it only gives information on total and average runtime. I would most like to see a log similar to the output of fprof, but in terms of average and total memory usage with respect to functions and processes.
For starters it would be enough to profile a single module, that does not spawn processes, only it's functions would be called. This would already help, for I could separate the program to distinct modules for testing.
Typical suspicious points are, where bigger lists are being handled.
Here the usage of ++
has been resolved by lists:reverse([Head|Tail])
like syntax.
I am also considering using ETS tables instead of Lists for cases with more than a few hundred elements.
Thank You in advance!