On Wed, Aug 31, 2022 at 9:00 AM ag9920 <jingong.w...@gmail.com> wrote:

> Hi, recently I've been trying to make my unit test faster. It seems too much 
> time were spent on initialization.

The "seems" part is a guess or a measurement? How much is "too much time"?

> After removing all init() function in relevant packages. The speed was still 
> very slow.It even takes dozens of seconds before entering my real unit test 
> function.

What operating system and what command line arguments are you using to
run the package tests? Latest Go version or not? Can you share the
go.mod file of the package? Do you use any variant of the 'go clean'
command, or something similar, before running the tests?

-- 
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/CAA40n-XsnJONGtn8yVLj6LPpyP%3DOxEbYxjRiaFDrrQO%3DBXTDRQ%40mail.gmail.com.

Reply via email to