[clangd-dev] Clangd + XPC

Jan Korous via clangd-dev clangd-dev at lists.llvm.org
Fri Aug 10 10:01:18 PDT 2018

> On 9 Aug 2018, at 18:00, Ilya Biryukov <ibiryukov at google.com> wrote:
> Hi Jan,
> Thanks for the update! It's great that we're after a solution that works at the protocol boundary, that does sound like something that should be easier to maintain and not too complicated.
> I have skimmed through the patch, and as far as I can tell the idea is to forward raw JSON messages back and forth via XPC without actually converting from JSON to XPC and back.
> Am I reading it correctly?

Hi Ilya,

Yes that’s correct - we did some performance measurements and it turned out that for JSON containing a lot of sub-objects (think 40k CompletionItem[]) the cost of conversion to XPC dictionary is actually higher than what we gain at IPC. Just sending string over XPC is faster.
Since we might possibly need to use ranking and filtering logic on client side this use-case is interesting for us.



> On Wed, Aug 8, 2018 at 5:38 PM Jan Korous via clangd-dev <clangd-dev at lists.llvm.org <mailto:clangd-dev at lists.llvm.org>> wrote:
> Hi all,
> Based on our discussion with Sam in https://reviews.llvm.org/D48559 <https://reviews.llvm.org/D48559> we talked about our requirements internally and ultimately decided to change our approach.
> We are going to use serialized JSON LSP over XPC instead of custom transport layer and we aren’t going to indroduce XPC-specific code to clangd binary itself which has several advantages.
> I put our current design for review to continue the discussion.
> https://reviews.llvm.org/D50452 <https://reviews.llvm.org/D50452>
> I would like to thank you all for the great feedback you gave us! It helped us to precisely pinpoint our requirements.
> Thanks.
> Jan
> _______________________________________________
> clangd-dev mailing list
> clangd-dev at lists.llvm.org <mailto:clangd-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev>
> -- 
> Regards,
> Ilya Biryukov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20180810/8c033f51/attachment.html>

More information about the clangd-dev mailing list