Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread Wojciech S. Czarnecki
Dnia 2022-08-31, o godz. 00:00:41 ag9920 napisaƂ(a): If you are in windows ecosystem exclude your development areas, including go installation and gocache from antivirus "heuristics". While at last most of AV vendors "discovered" that Go exists and it has its own linker, some dutifully sends

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread 'Michael Pratt' via golang-nuts
Setting GODEBUG=inittrace=1 will log a trace of init function execution, which you can use to determine if init is slow, and if so which packages. e.g., `GODEBUG=inittrace=1 go version` ends with "init main @9.5 ms", indicating that it look 9.5ms to run all init functions. The format is

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread Jan Mercl
On Wed, Aug 31, 2022 at 9:00 AM ag9920 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

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread 'Axel Wagner' via golang-nuts
On Wed, Aug 31, 2022 at 9:01 AM ag9920 wrote: > Hi, recently I've been trying to make my unit test faster. It seems too > much time were spent on initialization. After removing all init() function > in relevant packages. The speed was still very slow.It even takes dozens of > seconds before

[go-nuts] How long does it take to import packages?

2022-08-31 Thread ag9920
Hi, recently I've been trying to make my unit test faster. It seems too much time were spent on initialization. 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. So I take a look at