Every value with a space loads a time zone from disk
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- performance
Hướng nghiên cứu
Start with StringToDatetimeConverter.Convert in converter.go around line 211, then find the tests and benchmarks for string-to-datetime conversion. Check that ordinary strings containing spaces avoid unnecessary location loads, while valid named time zones still convert and failed loads are not cached. Done means the relevant tests and benchmarks pass and the host tzdata requirement is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Reproduction snippets assume:
fac := tupleconv.MakeStringToTTConvFactory()
Where: StringToDatetimeConverter.Convert (converter.go:211).
The converter splits the input on the first space and calls time.LoadLocation with the rest. Go doesn't cache locations, so every call reads tzdata from disk. In any/scalar, every string containing a space goes through this path before it falls back to string.
Benchmarks (linux/amd64, Go 1.26):
BenchmarkScalarNoSpace 1374 ns/op 573 B/op 23 allocs/op // "hello"
BenchmarkScalarWithSpace 31102 ns/op 41916 B/op 34 allocs/op // "hello world"
BenchmarkDatetimeOffset 319 ns/op 24 B/op 1 allocs/op // "2023-08-30T12:06:05+0200"
BenchmarkDatetimeTZName 10782 ns/op 6876 B/op 21 allocs/op // "2023-08-30T12:06:05 Europe/Paris"
Suggested fix: check that the date part has the expected shape before loading the location, and cache loaded locations by name (only successful loads, so arbitrary input can't grow the cache). Also document that named zones need tzdata on the host, or import _ "time/tzdata" in the binary (e.g. for scratch or distroless images).
- Ngôn ngữ chính
- Go
- Star
- 1
- Fork
- 0
- Merge trung bình
- 1 giờ 43 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tarantool/go-tupleconv
-
build issue code health
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tarantool/go-tupleconv#27 ·
-
code health
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
tarantool/go-tupleconv#26 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tarantool/go-tupleconv#25 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
tarantool/go-tupleconv#23 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
tarantool/go-tupleconv#22 ·
Tất cả issue của tarantool/go-tupleconv
Issue tương tự
-
Project submission: xmcp DocsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-research-finding chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jordansmall/spindrift#7370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
☢️ Bug v3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
The repo's gates check is clean and runs need no swapsCó thể đã có người làm @turbot-agent-fleet đã nhận hôm nay. Đang mởagent:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
turbot/tailpipe#677 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày