go-ethereum/eth/tracers
Martin HS e4dbd5f685
eth/tracers/js: avoid compiling js bigint when not needed (#30640)
While looking at some mem profiles from `evm` runs, I noticed that
`goja` compilation of the bigint library was present. The bigint library
compilation happens in a package `init`, whenever the package
`eth/tracers/js` is loaded. This PR changes it to load lazily when
needed.

It becomes slightly faster with this change, and slightly less alloc:y. 

Non-scientific benchmark with 100 executions: 
```
time for i in {1..100}; do ./evm --code 6040 run; done;
 ```

current `master`:

```
real    0m6.634s
user    0m5.213s
sys     0m2.277s
```
Without compiling bigint
```
real    0m5.802s
user    0m4.191s
sys     0m1.965s
```
2024-10-20 19:36:51 +03:00
..
internal eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
js eth/tracers/js: avoid compiling js bigint when not needed (#30640) 2024-10-20 19:36:51 +03:00
live eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
logger build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
native eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
api_test.go all: remove forkchoicer and reorgNeeded (#29179) 2024-09-04 15:03:06 +02:00
api.go eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
dir.go eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
live.go eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
tracers_test.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
tracker_test.go eth/traces: add state limit (#25812) 2022-10-06 10:48:04 +02:00
tracker.go eth/traces: add state limit (#25812) 2022-10-06 10:48:04 +02:00