-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow date parsing #10942
Comments
bep
added a commit
to bep/cast
that referenced
this issue
May 15, 2023
The current top 2 formats are, from some checks I've done, 2 dominant formats used in Hugo projects. Checking these first has a big effect: ```bash name old time/op new time/op delta CommonTimeLayouts-10 1.45µs ± 0% 0.33µs ± 1% -77.45% (p=0.029 n=4+4) name old alloc/op new alloc/op delta CommonTimeLayouts-10 1.55kB ± 0% 0.18kB ± 0% -88.14% (p=0.029 n=4+4) name old allocs/op new allocs/op delta CommonTimeLayouts-10 38.0 ± 0% 6.0 ± 0% -84.21% (p=0.029 n=4+4) ``` See gohugoio/hugo#10942
bep
added a commit
to spf13/cast
that referenced
this issue
May 15, 2023
The current top 2 formats are, from some checks I've done, 2 dominant formats used in Hugo projects. Checking these first has a big effect: ```bash name old time/op new time/op delta CommonTimeLayouts-10 1.45µs ± 0% 0.33µs ± 1% -77.45% (p=0.029 n=4+4) name old alloc/op new alloc/op delta CommonTimeLayouts-10 1.55kB ± 0% 0.18kB ± 0% -88.14% (p=0.029 n=4+4) name old allocs/op new allocs/op delta CommonTimeLayouts-10 38.0 ± 0% 6.0 ± 0% -84.21% (p=0.029 n=4+4) ``` See gohugoio/hugo#10942
bep
added a commit
to bep/hugo
that referenced
this issue
May 15, 2023
``` name old time/op new time/op delta Baseline/skiprender-10 24.5ms ±10% 22.3ms ± 4% -8.93% (p=0.029 n=4+4) name old alloc/op new alloc/op delta Baseline/skiprender-10 30.0MB ± 0% 26.2MB ± 0% -12.74% (p=0.029 n=4+4) name old allocs/op new allocs/op delta Baseline/skiprender-10 373k ± 0% 279k ± 0% -25.07% (p=0.029 n=4+4) ``` Fixes gohugoio#10942
We should probably start using https://github.com/araddon/dateparse somehow, but that feels like a little more work than I'm prepare to deliver for this today. |
bep
added a commit
that referenced
this issue
May 15, 2023
``` name old time/op new time/op delta Baseline/skiprender-10 24.5ms ±10% 22.3ms ± 4% -8.93% (p=0.029 n=4+4) name old alloc/op new alloc/op delta Baseline/skiprender-10 30.0MB ± 0% 26.2MB ± 0% -12.74% (p=0.029 n=4+4) name old allocs/op new allocs/op delta Baseline/skiprender-10 373k ± 0% 279k ± 0% -25.07% (p=0.029 n=4+4) ``` Fixes #10942
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm investigating some performance degradation in some work I'm doing, and see time parsing (unrelated to the work I'm doing) light up as a christmas tree in the memory profiler:
I guess this comes from the ineffective way of guessing the format in the upstream
cast
library:The text was updated successfully, but these errors were encountered: