Skip to content

Commit 8b03458

Browse files
charset: remove dependency on x/net and XML for extracting charset (#669)
Previously we we're dependent on x/net and xml packages. This change should improve performance.
1 parent e73d2b9 commit 8b03458

File tree

8 files changed

+864
-209
lines changed

8 files changed

+864
-209
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ jobs:
2020
with:
2121
go-version: 'stable'
2222
- run: go install golang.org/x/perf/cmd/benchstat@latest
23-
24-
# Hard to get stable results inside github actions, I think because of the shared
25-
# nature of the runners. Take the results of this benchmark with a grain of salt.
26-
- run: go test -run=none -bench=. -count=10 -timeout=30m ./... > /tmp/prev
27-
23+
- run: go test -run=none -bench=. -count=10 -benchtime=200ms -timeout=1h ./... > /tmp/prev
2824
- name: Checkout code
2925
uses: actions/[email protected]
3026
# Second run of benchmarks
31-
- run: go test -run=none -bench=. -count=10 -timeout=30m ./... > /tmp/curr
27+
- run: go test -run=none -bench=. -count=10 -benchtime=200ms -timeout=1h ./... > /tmp/curr
3228

3329
- run: benchstat /tmp/prev /tmp/curr

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ module github.com/gabriel-vasile/mimetype
77
// https://github.com/golang/go/issues/69095
88
go 1.23.0
99

10-
toolchain go1.23.1
11-
12-
require golang.org/x/net v0.39.0
10+
toolchain go1.23.6
1311

1412
// v1.4.4 had a test file detected as malicious by antivirus software. #575
1513
retract v1.4.4

go.sum

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)