Re: erl-complete ...
Matthias Radestock <[email protected]> Fri, 14 Sep 2007 21:34:01 +0100
| Newsgroups | gmane.comp.lang.erlang.distel.devel |
|---|---|
| Message-ID | <[email protected]> |
Bill, Bill Clementson wrote: > Matthias Radestock <[email protected]> writes: > >> Bill Clementson wrote: >>> Do a "M-." on "math:pi()" and you'll see that it's the only function >>> in the source file. >> In which case I know how to fix this: > [snip examples] > > Great - will you be preparing a patch to the Call Graph code so that > who_calls will also return info on BIF's? Changing the completion code to use xref, and include BIFs, is on my todo list. Don't know when I will get round to doing it though. The code I posted, together with the existing who_calls code and the explanation below should be enough for anybody to be able implement it. >> (except distel's completion currently isn't using xref, but it should) > > I guess the main problem with using xref for completion is speed. The > xref who_calls build process is fairly slow and (if a lot of new > functions are being added) could result in lengthy wait times when you > want to get a completion. I guess you could use a separate (different > from the who_calls server) xref server that always rebuilds and only > gets functions for the specified module though. Was that what you had > in mind? The current_who calls only builds the graph the first time you invoke it - which takes a while but is faster than what we had before - and then updates it incrementally for every subsequent invocation, which is very quick. For completion I would use a different xref instance, configured to operate in "modules" mode, which is sufficient in this case. See the code I posted in my previous email. The modules mode of xref is *much* faster to initialise - less than 2 seconds on my machine, so even the first invocation of completion will work at tolerable speed. As with who_calls, subsequent invocations will be set up to update the call graph with any changed modules. Matthias ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/