go-ethereum/eth/tracers
Daniel Liu 2b906f22f1
eth/tracers/js: avoid compiling js bigint when not needed #30640 (#1497)
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
```

Co-authored-by: Martin HS <martin@swende.se>
2025-09-17 08:17:18 +08:00
..
internal eth/tracers: fix golangci-lint warnings #30587 (#1489) 2025-09-13 10:51:42 +08:00
js eth/tracers/js: avoid compiling js bigint when not needed #30640 (#1497) 2025-09-17 08:17:18 +08:00
live eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
logger eth/tracers: fix golangci-lint warnings #30587 (#1489) 2025-09-13 10:51:42 +08:00
native eth/tracers: avoid panic in state test runner #30332 (#1485) 2025-09-13 10:50:10 +08:00
api.go eth/tracers: fix #29800 #29811 (#1467) 2025-09-13 10:27:18 +08:00
api_test.go eth/tracers, internal/ethapi: remove unnecessary map pointer in state override #30094 (#1483) 2025-09-13 10:41:51 +08:00
dir.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
live.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
tracers_test.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
tracker.go eth/traces: add state limit #25812 (#1300) 2025-09-09 07:03:24 +08:00
tracker_test.go eth/traces: add state limit #25812 (#1300) 2025-09-09 07:03:24 +08:00