kezhenxu94 opened a new pull request #4318: Reduce footprint via prototype 
pattern when tagging spans
URL: https://github.com/apache/skywalking/pull/4318
 
 
   ### Motivation:
   
   Reduce footprint when tagging spans with the deprecated API: 
`AbstractSpan#tag(String, String)`.
   
   ### Modifications:
   
   - Adopt [prototype pattern](https://en.wikipedia.org/wiki/Prototype_pattern) 
to create `Tag`, prevent from creating too many `StringTag` instances and 
`GC`ed, because ``AbstractSpan#tag(String, String)` simply `new` a `StringTag` 
every time and calls `AbstractSpan#tag(AbstractTag, String)`.
   
   - Replace `AbstractSpan#tag(String, String)` with 
`AbstractSpan#tag(AbstractTag, String)`.
   
   - Remove deprecated API: `AbstractSpan#tag(String, String)`.
   
   ### Result:
   
   - Deprecated API is removed.
   
   - Footprint is reduced.
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to