You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/11/30 08:08:43 UTC
[GitHub] [skywalking] starboyate opened a new issue #5925: Optimize the addition of TraceSegmentRef
starboyate opened a new issue #5925:
URL: https://github.com/apache/skywalking/issues/5925
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [ ] Feature or performance improvement
___
### Question
when the extract() and continued() methods of TraceContext are called, TraceSegmentRef is created in the outer layer and then ref() is called to bind. If the corresponding TraceSegmentRef already exists, then no operation is done in the ref() method, here Will cause useless TraceSegmentRef object creation
___
### Requirement or improvement
I think some common fields of ContextCarrier and ContextSnapshot can be extracted and defined as the parent class, and then provide a method to create TraceSegmentRef based on the parent class. In the ref() method of TraceSegment, the parameter is defined as the parent class, and then the ref() method returns TraceSegmentRef for external use
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735632992
What do you mean `in the outer layer`? Could you make yourself clear? Do you mean without active running context?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] starboyate edited a comment on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
starboyate edited a comment on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735637704
I mean that the corresponding TraceSegmentRef will be created in the extract() and continued() methods of TracingContext, and then bound through the ref() method. However, if the TraceSegmentRef exists, then it will create a useless TraceSegmentRefobject?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735638977
What do you mean useless? Ref is designed to be created. I can't see your point.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] starboyate closed issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
starboyate closed issue #5925:
URL: https://github.com/apache/skywalking/issues/5925
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735650623
Could you share the real use case? If you want to change source codes in your private usage, it is open to you. Feel free to do anything you like. In the upstream, I can't see the issue now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735643000
I am still not following. This method belongs to TraceSegment, which is owned by TracingContext. What is the issue?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] starboyate commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
starboyate commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735637704
I mean that the corresponding tracesementref will be created in the extract() and continued() methods of tracingcontext, and then bound through the ref() method. However, if the tracesemmentref exists, then it will create a useless tracesemmentref object?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] starboyate edited a comment on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
starboyate edited a comment on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735637704
I mean that the corresponding TraceSegmentRef will be created in the extract() and continued() methods of TracingContext, and then bound through the ref() method. However, if the TraceSegmentRef exists, then it will create a useless TraceSegmentRef object?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] starboyate commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
starboyate commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735641100
Maybe there is something wrong with what I described. I mean useless. That is, if there is a corresponding TraceSegmentRef in the LinkedList, the newly created TraceSegmentRef will not be added. This will create an object in the heap, but it will not be used

----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] starboyate commented on issue #5925: Optimize the addition of TraceSegmentRef
Posted by GitBox <gi...@apache.org>.
starboyate commented on issue #5925:
URL: https://github.com/apache/skywalking/issues/5925#issuecomment-735646458


I just think it can save the extra creation of TraceSegmentRef object, because the created TraceSegmentRef object may already exist. If the corresponding TraceSegmentRef object already exists, there is no need to create it and then judge whether it exists, which will result in the creation of TraceSegmentRef It doesn't work because it already exists in the LinkedList
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org