<div dir="ltr">looping in a couple of people working in that area<br><br><div class="gmail_quote"><div dir="ltr">On Sat, Jan 9, 2016 at 3:54 AM Val Markovic <<a href="mailto:val@markovic.io">val@markovic.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">For YCM, <a href="https://github.com/Valloric/ycmd/blob/master/cpp/ycm/ClangCompleter/TranslationUnit.cpp#L38" target="_blank">we pass a the CXTranslationUnit_Incomplete flag</a> that provides a massive boost to performance. It doesn't do what you're asking for though (which BTW would be great).</div></blockquote><div><br></div><div>Note that the implementation Maksym talks about already uses that flag.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 7, 2016 at 1:34 PM, Maksym Taran <span dir="ltr"><<a href="mailto:mtaran@google.com" target="_blank">mtaran@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="line-height:19.5px">Hello!</span></div><div><span style="font-size:13px;line-height:19.5px"><br></span></div><span style="font-size:13px;line-height:19.5px">I'm looking into improving how an autocomplete system at Google computes </span>semantic autocompletions<span style="font-size:13px;line-height:19.5px"> for a given C++ file + line + column. Currently, it's mostly just calling out to </span><a href="https://github.com/llvm-mirror/clang/blob/52ed5ec631b0bbf5c714baa0cd83c33ebfe0c6aa/tools/libclang/CIndexCodeCompletion.cpp#L798" style="font-size:13px;line-height:19.5px" target="_blank">clang_codeCompleteAt</a><span style="font-size:13px;line-height:19.5px">, and that's where we've been seeing high latency.</span><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">A particular problem we're having is that when we try to autocomplete just within some scope (that is, just inside a function body, rather than after a . or -> etc), calling that method returns *all* possible autocompletion results, which includes all constants and class names defined in all the transitively included files as far as I can tell. This is technically correct, but in practice takes on the order of seconds to return, which is much longer than the desired timeframe for autocompletion results. So I'd like to know if there's some way I can get a smaller set of autocompletions more quickly, e.g. by asking clang to complete only on method names and locals, or by giving a time limit to get results. I didn't see how I might do that in the <a href="http://clang.llvm.org/doxygen/group__CINDEX__CODE__COMPLET.html#ga50fedfa85d8d1517363952f2e10aa3bf" target="_blank">documentation</a> so I'm wondering if there are some other APIs I'm not seeing.</div><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">I took a look at <a href="https://github.com/Valloric/YouCompleteMe" target="_blank">YouCompleteMe</a> and it's <a href="https://github.com/Valloric/ycmd/blob/master/cpp/ycm/ClangCompleter/TranslationUnit.cpp#L176" target="_blank">using the same API</a>, so I suspect it might have the same problem. If there's no way to do something like this using the current API methods, I'd be interested to know how possible/difficult would it be to implement additional methods or options?</div><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">Thank you!</div><span><font color="#888888"><div style="font-size:13px;line-height:19.5px">Maksym</div></font></span></div>
</blockquote></div><br></div>
</blockquote></div></div>