-
-
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 82.72% 82.72% -0.01%
==========================================
Files 115 115
Lines 11365 11363 -2
==========================================
- Hits 9402 9400 -2
Misses 1557 1557
Partials 406 406
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: 23e90c0 | Previous: 1c9b6ce | Ratio |
---|---|---|---|
`Benchmark_RoutePatternMatch//api/:param/fixedEnd_ | not_match | _/api/abc/def/fixedEnd - allocs/op` | 14 allocs/op |
BenchmarkAppendMsgitem-4_middleware_csrf - MB/s |
3159.86 MB/s |
1615.48 MB/s |
1.96 |
BenchmarkAppendMsgstorageManager - MB/s |
3221.65 MB/s |
1612.35 MB/s |
2.00 |
BenchmarkAppendMsgdata - MB/s |
3225.24 MB/s |
1612.94 MB/s |
2.00 |
This comment was automatically generated by workflow using github-action-benchmark.
Description
Improvements to RemoveEscapeChar()
After:
Before:
Router Improvements
TBD (Coming soon)
Type of change