I'm currently working on a Go program that loads data from a database, runs some calculations and then saves the results to the same database. There are multiple gorutines.
The runtime (5-6 minutes) was surprisingly long. Following this article I performed CPU profiling and it turns out that 70%+ of the CPU time is Garbage Collection related code running.
Now, I tried memory profiling but none of my my code appears in the results. This is my first time profiling a program - I don't know how to proceed with optimisation of the program or where to look for problems. I appreciate any help.
Thanks in advance!