You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/06/15 10:33:42 UTC

[GitHub] [trafficserver] brbzull0 opened a new pull request, #8916: JSONRPC: replace std::string with std::string_view when registring a new endpoint.

brbzull0 opened a new pull request, #8916:
URL: https://github.com/apache/trafficserver/pull/8916

   1 - Use `std::string_view` in the RPC manager class to avoid possible extra heap allocation when registring a new endpoint.
   2 - Fix typo.


-- 
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: github-unsubscribe@trafficserver.apache.org

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


[GitHub] [trafficserver] SolidWallOfCode commented on pull request #8916: JSONRPC: replace std::string with std::string_view when registring a new endpoint.

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on PR #8916:
URL: https://github.com/apache/trafficserver/pull/8916#issuecomment-1156632824

   Looking at this -
   ```
   return _handlers.emplace(name, std::move(call)).second;
   ```
   What is the type of the name in the object? Does it persist after the string view goes out of scope?


-- 
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: github-unsubscribe@trafficserver.apache.org

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


[GitHub] [trafficserver] brbzull0 merged pull request #8916: JSONRPC: replace std::string with std::string_view when registring a new endpoint.

Posted by GitBox <gi...@apache.org>.
brbzull0 merged PR #8916:
URL: https://github.com/apache/trafficserver/pull/8916


-- 
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: github-unsubscribe@trafficserver.apache.org

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


[GitHub] [trafficserver] brbzull0 commented on pull request #8916: JSONRPC: replace std::string with std::string_view when registring a new endpoint.

Posted by GitBox <gi...@apache.org>.
brbzull0 commented on PR #8916:
URL: https://github.com/apache/trafficserver/pull/8916#issuecomment-1156635511

   > Looking at this -
   > 
   > ```
   > return _handlers.emplace(name, std::move(call)).second;
   > ```
   > 
   > What is the type of the name in the object? Does it persist after the string view goes out of scope?
   
   It does:
   
   https://github.com/apache/trafficserver/blob/62a596c5f646677f0edeeb92d7be09ab19f822d2/mgmt2/rpc/jsonrpc/JsonRPCManager.h#L237
   
   `std::string`


-- 
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: github-unsubscribe@trafficserver.apache.org

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