Hi everybody, I develop a script which parse a file and foreach row I perform several treatment who need to use an index to access at a file.
Foreach row I create a goroutine. the number of goroutine is limited to 8 by using the package from "github.com/korovkin/limiter" and GOMAXPROC=8 For each routine I load the index and open the file to avoid conflict ( 8 index was created at the beginning and shared with channel ). So when I launch the script, it take ~2 seconds for 1000 rows. (cpu < 100% during all the process) When it done, If I relaunch it , it take ~300ms for 1000 rows (cpu > 700% during all te process). If I launch the script with only one routine, the time also 1-2 second for 1000 rows. It's difficult to share the script. Did you had the same behaviour in your scripts ? Do you have an idea why the performance is 10x better if I launch 2 times my script ? For information this behaviour is the same on MACOS or CENTOS. thank you for your help -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/7cdc1629-6172-49e4-97be-881de9f58c67%40googlegroups.com.