<div dir="ltr">Following up with what Tanner and Chris said. I think HTTP 2 is particularly difficult, and you&#39;re right chris, bringing in a c library, even if just temporarily will help expedite the process in an efficient way.<div><br></div><div>I am however pretty ardently against porting C code to Swift as opposed to rethinking things for a Swift paradigm. If that&#39;s the case, I&#39;d prefer to either link to the c code, or bring it into the Swift compiler. The end result would appear to be the same.</div><div><br></div><div> - Logan</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 3, 2016 at 4:46 PM Tanner Nelson via swift-server-dev &lt;<a href="mailto:swift-server-dev@swift.org">swift-server-dev@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="gmail_msg"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="gmail_msg"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="gmail_msg"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="gmail_msg"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="gmail_msg"><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><div class="gmail_msg"><font color="#5f5f5f" class="gmail_msg">Tanner Nelson</font></div><div style="color:rgb(0,0,0)" class="gmail_msg"><font color="#9dacd1" class="gmail_msg">Va</font><font color="#aeb2cf" class="gmail_msg">p</font><font color="#c8bacd" class="gmail_msg">o</font><font color="#d0becc" class="gmail_msg">r</font><font color="#9dacd1" class="gmail_msg"> </font></div><div class="gmail_msg"><font color="#676767" class="gmail_msg"><a href="tel:(435)%20773-2831" value="+14357732831" class="gmail_msg" target="_blank">+1 (435) 773-2831</a></font></div></div></div></div></div></div></div>
</div>
<br class="gmail_msg"></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Nov 3, 2016, at 4:34 PM, Helge Heß via swift-server-dev &lt;<a href="mailto:swift-server-dev@swift.org" class="gmail_msg" target="_blank">swift-server-dev@swift.org</a>&gt; wrote:</div><br class="m_968360504658850123Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div class="gmail_msg">On 3 Nov 2016, at 19:41, Alfredo Delli Bovi &lt;<a href="mailto:alfredo.dellibovi@gmail.com" class="gmail_msg" target="_blank">alfredo.dellibovi@gmail.com</a>&gt; wrote:<br class="gmail_msg"><blockquote type="cite" class="gmail_msg">There has been some discussions about this in Kitura already (<a href="https://github.com/IBM-Swift/Kitura-net/issues/52" class="gmail_msg" target="_blank">https://github.com/IBM-Swift/Kitura-net/issues/52</a>) and I think we can use what they found out at the moment.<br class="gmail_msg">In my opinion, if we are not able to give the same (or better) performance we should go for a wrapper of a more performant lib, such as http_parser.<br class="gmail_msg"></blockquote><br class="gmail_msg">They claim that their port is just ~1/3 slower, that seems perfectly reasonable to me. I’m all for using it.<br class="gmail_msg"></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">As far as I can tell, the package in question here is a carbon copy of the C parser (UnsafePointers, asserts, global funcs). The only difference is it&#39;s 1/3 slower. </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">A big performance hit like that is not worth it unless we&#39;re getting improved readability or safety out of the code. </div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg">I also agree with the overall sentiment that a ‘pure’ Swift solution should be preferred.<br class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg">Of course it’s also matter of the workload that have, we could always start with a wrapper, so we are able to define the APIs layer and ship a version with it and later on changing the implementation with a pure Swift.<br class="gmail_msg"></blockquote><br class="gmail_msg">Yes, the API should sit on top of this and be essentially parser agnostic.<br class="gmail_msg"><br class="gmail_msg">hh<br class="gmail_msg"><br class="gmail_msg">_______________________________________________<br class="gmail_msg">swift-server-dev mailing list<br class="gmail_msg"><a href="mailto:swift-server-dev@swift.org" class="gmail_msg" target="_blank">swift-server-dev@swift.org</a><br class="gmail_msg"><a href="https://lists.swift.org/mailman/listinfo/swift-server-dev" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-server-dev</a><br class="gmail_msg"></div></div></blockquote></div><br class="gmail_msg"></div>_______________________________________________<br class="gmail_msg">
swift-server-dev mailing list<br class="gmail_msg">
<a href="mailto:swift-server-dev@swift.org" class="gmail_msg" target="_blank">swift-server-dev@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-server-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-server-dev</a><br class="gmail_msg">
</blockquote></div>