-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🧹 chore: Improve Performance of Fiber Router #3261
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3261 +/- ##
==========================================
- Coverage 84.40% 84.28% -0.12%
==========================================
Files 116 116
Lines 11485 11507 +22
==========================================
+ Hits 9694 9699 +5
- Misses 1374 1385 +11
- Partials 417 423 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -620,10 +620,16 @@ func GetTrimmedParam(param string) string { | |||
|
|||
// RemoveEscapeChar remove escape characters | |||
func RemoveEscapeChar(word string) string { | |||
if strings.IndexByte(word, escapeChar) != -1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change alone saves 12ns/op
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50
.
Benchmark suite | Current: 8e213e0 | Previous: 57744eb | Ratio |
---|---|---|---|
`Benchmark_RoutePatternMatch//api/:param/fixedEnd_ | not_match | _/api/abc/def/fixedEnd - allocs/op` | 14 allocs/op |
Benchmark_Compress_Levels/Brotli_LevelBestCompression - B/op |
5 B/op |
0 B/op |
+∞ |
BenchmarkUnmarshalitem-4_middleware_limiter |
40.74 ns/op 638.25 MB/s 0 B/op 0 allocs/op |
26.61 ns/op 977.07 MB/s 0 B/op 0 allocs/op |
1.53 |
BenchmarkUnmarshalitem-4_middleware_limiter - ns/op |
40.74 ns/op |
26.61 ns/op |
1.53 |
This comment was automatically generated by workflow using github-action-benchmark.
@ReneWerner87 @efectn v2 vs main vs this branch |
Description
Improvements to RemoveEscapeChar()
After:
Before:
Router Improvements
TBD (Coming soon)
Type of change