You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/11 08:13:24 UTC

[GitHub] [dubbo-getty] LaurenceLiZhixin opened a new pull request #76: remove read buffer collection

LaurenceLiZhixin opened a new pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-getty] AlexStocks commented on a change in pull request #76: remove read buffer collection

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76#discussion_r711415672



##########
File path: session.go
##########
@@ -607,12 +607,10 @@ func (s *session) handleTCPPackage() error {
 	bufp = gxbytes.GetBytes(maxReadBufLen)
 	buf = *bufp
 
-	// pktBuf = new(bytes.Buffer)
-	pktBuf = gxbytes.GetBytesBuffer()
+	pktBuf = new(bytes.Buffer)
 
 	defer func() {
 		gxbytes.PutBytes(bufp)
-		gxbytes.PutBytesBuffer(pktBuf)

Review comment:
       就算按照你这个改进,这个 defer 根本就不需要了。因为你每个 pkgBuf 都是 new 出来的。对 gxbytes 中的 缓存池而言,只有 put 没有 get,还是会造成内存被缓存。




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-getty] AlexStocks merged pull request #76: remove read buffer collection

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-getty] codecov-commenter edited a comment on pull request #76: remove read buffer collection

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76#issuecomment-917365226


   # [Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#76](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fb96d44) into [master](https://codecov.io/gh/apache/dubbo-getty/commit/917228c6373bd550818347e564ac89c6cd74696e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (917228c) will **decrease** coverage by `0.08%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-getty/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=WDmUsbxiLS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #76      +/-   ##
   ==========================================
   - Coverage   69.14%   69.05%   -0.09%     
   ==========================================
     Files           8        8              
     Lines        1426     1422       -4     
   ==========================================
   - Hits          986      982       -4     
     Misses        347      347              
     Partials       93       93              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [session.go](https://codecov.io/gh/apache/dubbo-getty/pull/76/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Vzc2lvbi5nbw==) | `70.02% <100.00%> (-0.27%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [917228c...fb96d44](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-getty] codecov-commenter commented on pull request #76: remove read buffer collection

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76#issuecomment-917365226


   # [Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#76](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c7df4be) into [master](https://codecov.io/gh/apache/dubbo-getty/commit/917228c6373bd550818347e564ac89c6cd74696e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (917228c) will **decrease** coverage by `0.02%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-getty/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=WDmUsbxiLS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #76      +/-   ##
   ==========================================
   - Coverage   69.14%   69.12%   -0.03%     
   ==========================================
     Files           8        8              
     Lines        1426     1425       -1     
   ==========================================
   - Hits          986      985       -1     
     Misses        347      347              
     Partials       93       93              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [session.go](https://codecov.io/gh/apache/dubbo-getty/pull/76/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Vzc2lvbi5nbw==) | `70.21% <100.00%> (-0.07%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [917228c...c7df4be](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-getty] codecov-commenter edited a comment on pull request #76: remove read buffer collection

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76#issuecomment-917365226


   # [Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#76](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c7df4be) into [master](https://codecov.io/gh/apache/dubbo-getty/commit/917228c6373bd550818347e564ac89c6cd74696e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (917228c) will **decrease** coverage by `0.02%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-getty/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=WDmUsbxiLS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #76      +/-   ##
   ==========================================
   - Coverage   69.14%   69.12%   -0.03%     
   ==========================================
     Files           8        8              
     Lines        1426     1425       -1     
   ==========================================
   - Hits          986      985       -1     
     Misses        347      347              
     Partials       93       93              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [session.go](https://codecov.io/gh/apache/dubbo-getty/pull/76/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Vzc2lvbi5nbw==) | `70.21% <100.00%> (-0.07%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [917228c...c7df4be](https://codecov.io/gh/apache/dubbo-getty/pull/76?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-getty] cnlas commented on pull request #76: remove read buffer collection

Posted by GitBox <gi...@apache.org>.
cnlas commented on pull request #76:
URL: https://github.com/apache/dubbo-getty/pull/76#issuecomment-941081853


   bufp is still acquired from pool, why del the defer in second comit?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org