-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaling up to large source base ? #436
Comments
On Tue, Sep 29, 2015 at 7:00 PM, Martin Oberhuber notifications@github.com
|
Hey, I use rtags to parse the chromium code base which is the same code base chrome and Chrome OS are based on! Actually, I haven't any speed complains, the database is quit big though Update: Regards, |
Here are some more accurate key facts.
Further, I made some time measurements for some of the
Well, numbers don't lie, do they? In fact the numbers in bold and with a question mark are questionable. Because when I used one of those function to find references it did work well if the symbol was less than 200 times referenced. But somehow if it was referenced more often the hole thing just hung and I had to hit To sum up, rtags is pretty fast but there are still some things which need to be fixed/improved, especially rtags has some problems finding references, if symbols often occur, e.g. 200 times or more like std :: string, as in my case. Chris |
Hi Guys Thanks for the praise :-) We don't actually keep the clang translation unit around (among other I think the best bet is to devote some space to the database at this point. I don't quite understand why it would take as much as 10 seconds to find E.g. time rc --current-file=/path/to/file.cpp -r /path/to/file.cpp:123 -k It seems to me like something odd is going on. For a codebase that small it Anders Are you able to reproduce this issue with > 200 results? I can't seem to It seems to work correctly as well by finding references to CXCursor in Anders On Wed, Sep 30, 2015 at 11:36 AM, Christian Schwarzgruber <
|
Hey @Andersbakken
I'll look into this in more depth in the next couple days. I should have mentioned that I have used this little function from https://lists.gnu.org/archive/html/help-gnu-emacs/2008-06/msg00087.html to measure the time the bodies of the |
Hi @Andersbakken , Our test project was rtags itself :) time rc -r src/QueryJob.h:94:20 takes in the range of 10-12 seconds on Ubuntu 14.04. Perhaps the problem here was looking at a header file rather than source file ? And perhaps that's the same std::string issue that @cslux sees? Hi @cslux , Your collected data is very interesting ! Boils down to 1MB per file approx, same as what we saw. Cheers! |
@aaptel , the ctags file is 114KB but not really comparable to rtags in terms of functionality on C++ code. |
Hey @moberhuber
Building and indexing takes roughly the same time. Maybe I will make a test when I get my new Laptop, so I can use the old one (current) for the tests, otherwise I would sophisticate the result when doing other work.
Well, I did not make any serious profiling. But from what Regarding the database size, the eclipse pdom file is ~600 MB big but can't tell you right now how many files of the chromium code base it has parsed, as I have added a lot "Exclude filters" to reduce the project size, this was necessary because eclipse was completely overwhelmed by the size of the chromium code base :-). My guess would be ~16k files where left to parse.
I will definitely investigate the problem in more detail. Will report back when I found something or not. |
Hey @Andersbakken
Nope, doesn't work! The thing just seems to hang in a loop when calling
If I execute the same Further, calling Next step: |
@Andersbakken src/RTagsClang.h:50:25: template <> struct hash<CXCursor> : public unary_function<CXCursor, size_t> function: struct hash<CXCursor> Next line would be. src/RTagsClang.h:50:59: template <> struct hash<CXCursor> : public unary_function<CXCursor, size_t> function: struct hash<CXCursor> The equivalent
Which gives me all matches (235 lines). The Calling
The buffer size was always the same when calling Interesting, isn't it? Do you maybe know what's going on here? |
Hm. I get vastly better numbers than that: (master)[src_rtags][abakken@tap:~/dev/rtags] time rc -r src/QueryJob.h:94:20 real 0m0.375s real 0m0.014s real 0m0.012s real 0m0.015s RTags relies on quick disk io. Is your data directory (~/.rtags) possibly mounted on some network drive or something like that? Anders |
Hey @Andersbakken , ok some updates regarding the issue that rc only gets part of the request (rtags-find-references*). Chris |
Hey @Andersbakken, one more thing I have just noticed. When I start To summarize, if Here my
BTW, why does Thanks, |
Hi Christian Ah. That makes some sense. Since rdm is running inside of emacs it gets Maybe --silent should be added to the parameters when rdm is run from By default all log messages end up in the log file but with I just turned them into warnings which means that you have to pass -v to Anders On Fri, Oct 2, 2015 at 3:48 PM, Christian Schwarzgruber <
|
|
Glad to hear. Anders On Sun, Oct 4, 2015 at 11:51 AM, Christian Schwarzgruber <
|
You wrote:
Yes, our $HOME is on an NFS share ; still I had not expected a 10x performance degradation down to 10 sec wait time. Also note we see the 10 sec every time (so no disk cache of any sort helps here), and normal navigations are fast whereas only the specific one is slow. |
That is a little strange. It's not always easy to tell how many files were opened for a given query but I just added something that will dump it out as a warning. Can you try this: pull to 7285645 rdm -v Now it should tell you how many files were opened after each query. |
#719 is related I think. |
Hi rtags team, first of all thanks for this great project !
We've just started looking at it, and while doing so noticed that the rtags database tends to be large (60MB on 62 source files). Also in one instance, navigating a virtual method call was slow (10 sec on the mentioned database).
Has anyone tested how rtags scales up to a large source base like Google Chrome, Mozilla Firefox, or Clang itself ? Has anybody thought about ways to scale up, such as not storing local variables (and references) in the database since they can be re-computed easily on demand ?
Many thanks in advance for any input !
The text was updated successfully, but these errors were encountered: