Bug 387830 - Autoload repositories causes 3.4 gig ctags file
Summary: Autoload repositories causes 3.4 gig ctags file
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 17.08.2
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Christoph Cullmann
URL:
Keywords:
: 386944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-12 15:46 UTC by zeta
Modified: 2019-09-27 13:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zeta 2017-12-12 15:46:14 UTC
Version is actually 17.08.3, from neon.

I have a git repository that whenever I open any file with kate, it spawns a process:

ctags -L - -f /tmp/kate.project.ctags.TJ5084 --fields=+K+n

The file /tmp/kate.project.ctags.TJ5084 grows up to 3.4 G and then this message is outputted:

QProcess: Destroyed while process ("ctags") is still running.

This does not happen if I uncheck "Git" from the "Autoload Repositories" section of Projects configuration.

The repo is not that big, 405 MB (177 MB from .git)

My guess is that kate starts feeding to ctags the same file name over and over again, but i dont know how to check that.

Any advice on how to give you more details?

Thanks
Comment 1 zeta 2017-12-12 15:48:31 UTC
*** Bug 386944 has been marked as a duplicate of this bug. ***
Comment 2 Christoph Cullmann 2017-12-20 18:50:23 UTC
Hi, I have taken a look at the code.

The 

QProcess: Destroyed while process ("ctags") is still running.

is I guess the fail of the code to catch the case "ctags takes longer than 30 seconds."

For the "files are duplicated added to the ctags call", I think that is not the case, but ctags might just be a bad idea for that repo. I should reconsider if ctags should be auto-on, looks like a bad idea in some cases :/
Comment 3 zeta 2018-01-05 23:44:34 UTC
Yea, I did turn it off. Which is bad for other repos :( 

(Is it possible to configure the autoload per repo?)

I think of duplication or recursion loop because the sizes really do not make any sense. Out of the 230 MB in the repo, there are probably just 50 MB of actual code, so Im thinking of a problem in ctags itself. 

If you can guide me on process tracing to see what goes in that ctags stdin, I'll be more then happy to investigate.

Best regards.
Comment 4 Christoph Cullmann 2018-01-10 07:43:07 UTC
More or less we just feed in git ls-files as stdin for the ctags.
Comment 5 zeta 2018-01-11 00:52:27 UTC
I cannot reproduce it anymore:
It was either fixed in recent versions, or maybe it was a specific symlink configuration that was messing things up.
Current versions:

➤ $ kate --version
kate 17.12.0
➤ $ ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
➤ $ git --version                                                                                                             git version 2.13.2
Comment 6 Christoph Cullmann 2018-01-11 08:53:50 UTC
I think I still need to make the ctags stuff "optional", to let people turn it off if they have issues (or just don't want it).
Comment 7 zeta 2018-01-18 20:55:09 UTC
Or let the user type a whitelist/blackstic of repos to include or exclude from autoload.

Are you saying that it could be possible to have the 'Proyects' tab enabled but without ctags? Maybe an extra checkbox on the config.

I'll lower the importance of the bug to minor, as I think other bugs may be more relevant. Still, if you are already invested go ahead. 

I'm not a C programmer but still, tell me if you need anything.
Comment 8 Christoph Cullmann 2019-09-27 13:01:59 UTC
Git commit a592bf54ba7d0ab4c7a2fa967447b12dd76d768d by Christoph Cullmann.
Committed on 27/09/2019 at 13:00.
Pushed by cullmann into branch 'master'.

disable ctags indexing per default

one can enable it via

"index": true

in the .kateproject.

The GUI tells this now.
Related: bug 412351

M  +7    -5    .kateproject
M  +4    -4    addons/project/kateproject.cpp
M  +9    -2    addons/project/kateprojectinfoviewindex.cpp
M  +11   -4    addons/project/kateprojectworker.cpp
M  +3    -3    addons/project/kateprojectworker.h

https://invent.kde.org/kde/kate/commit/a592bf54ba7d0ab4c7a2fa967447b12dd76d768d
Comment 9 Christoph Cullmann 2019-09-27 13:02:04 UTC
Git commit a592bf54ba7d0ab4c7a2fa967447b12dd76d768d by Christoph Cullmann.
Committed on 27/09/2019 at 13:00.
Pushed by scmsync into branch 'master'.

disable ctags indexing per default

one can enable it via

"index": true

in the .kateproject.

The GUI tells this now.
Related: bug 412351

M  +7    -5    .kateproject
M  +4    -4    addons/project/kateproject.cpp
M  +9    -2    addons/project/kateprojectinfoviewindex.cpp
M  +11   -4    addons/project/kateprojectworker.cpp
M  +3    -3    addons/project/kateprojectworker.h

https://commits.kde.org/kate/a592bf54ba7d0ab4c7a2fa967447b12dd76d768d