-
Notifications
You must be signed in to change notification settings - Fork 797
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
opt filtermanager 'onContinueReading' performance #1933
base: master
Are you sure you want to change the base?
Conversation
@@ -64,3 +64,5 @@ require ( | |||
) | |||
|
|||
replace github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.9.4 | |||
|
|||
replace mosn.io/api => ../mosn-api |
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.
should not push these local changes.
|
||
buf := fm.conn.GetReadBuffer() | ||
func (fm *filterManager) onContinueReading(previousIndex int, buf buffer.IoBuffer) { |
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.
func (fm *filterManager) onContinueReading(previousIndex int, buf buffer.IoBuffer) { | |
func (fm *filterManager) onContinueReading(index int, buf buffer.IoBuffer) { |
maybe we can just use index
here? It looks more simpiler.
//fm.conn.Write("your data") | ||
return | ||
} | ||
for ; index < len(fm.upstreamFilters); index++ { |
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.
I'm not sure if it is safe to skip checking uf.initialized
here.
@taoyuanyuan @nejisama may confirm it.
Issues associated with this PR
#1932
Solutions
You should show your solutions about the issues in your PR, including the overall solutions, details and the changes. At this time, Chinese is allowed to describe these.
UT result
Unit Test is needed if the code is changed, your unit test should cover boundary cases, corner cases, and some exceptional cases. And you need to show the UT result.
Benchmark
If your code involves the processing of every request, you should give the Benchmark Result.
Code Style
Goimports
has runGolint
result