ok2c commented on PR #454:
URL: 
https://github.com/apache/httpcomponents-client/pull/454#issuecomment-1586332205

   > @ok2c Just two remarks,
   > 
   >     * I noticed that the Upgrade and Trailer headers are currently missing 
from the HOP_BY_HOP Set. 
   
   @arturobernalg Good catch. I overlooked `Upgrade`. Corrected. But for some 
reason `Trailer` is no longer mentioned in RFC 9110, Section 7.6.1. I do not 
know why. So is `Host` but I think it should be. This is the problem with 
mixing up conformance with different specification revisions. 
   
   > 
   >     * Given that the primary operation we are using in this case is 
contains, which checks if a certain header is in the "hop-by-hop" set, we might 
get better performance by using a HashSet. A HashSet has an average time 
complexity of O(1) for these operations which makes it more efficient for 
larger data sets.
   
   This is true. The problem is that `HashSet` operations are case-sensitive. 
Therefore each lookup operation would require a normalized input, which in 
practical terms implies creation of an extra copy of the header name. I believe 
this is more expensive than having a `TreeSet` with just a few elements in it.  
   
   
   


-- 
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: dev-unsubscr...@hc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to