[cfe-dev] Announcing Crange

Anurag gnurag at gmail.com
Fri May 9 13:43:38 PDT 2014


Hello Renato,

On Fri, May 9, 2014 at 6:52 PM, Renato Golin <renato.golin at linaro.org> wrote:
> Did you compare against CTags/ETags? IDEs indexing services (Eclipse,
> CodeBlocks, etc)?
>
> I know the depth you get with Clang is orders of magnitude more than
> ctags, but ctags finishes all my projects in a couple of minutes. I'd
> only accept 28 hours (I only have 8 CPUs) if it did my morning coffee
> and toast, too. :)

I did explore Ctags, GNU Global and Cscope before going on to
reinvent. While ctags is the gold standard, when it comes to the speed
of generating tags database, Global and Cscope are also quite good at
generating xrefs. However, given the level of detail exposed by clang
nodes, I wanted to go a step further and index included files, source
range, statements, operators, types etc too.

Perhaps, I should update the messaging a bit and position this tool
differently. I don't believe Crange is a replacement for
Global/Cscope.

Python doesn't really seem to be a good choice of language to
implement this in. I suspect python's multiprocessing.Queue is
spending too much time in mutex lock. 28 hours for indexing is
definitely not encouraging.

> I'm also guessing that this is a full run, and that when files change,
> a partial run (only regarding the changed files) would run a lot
> faster.
>
> Also, for comparison, I used to have a ctags re-run once files were
> saved on the disk when my editor was spawned (part of the start
> script) and it would always take seconds. I think it's only when it
> gets to that level that people will actually look more seriously
> towards your tool...

Running partial database updates is on my 'must have' list. I'm
planning to index file's last modified time as well, and skip the ones
that didn't change.

Thanks for your feedback Renato.



More information about the cfe-dev mailing list