dlang-vscode icon indicating copy to clipboard operation
dlang-vscode copied to clipboard

Go to Symbols Slow for Large Files.

Open skl131313 opened this issue 7 years ago • 11 comments

Part of the problem seems to be the use of --ast with dscanner. Using dscanner --ast with std.datetime takes upwards of a minute and generates a 60 megabyte file. Using --ctags though it is almost instant. I remember that one of the reasons "ctags" wasn't used was because it couldn't use stdin, but it seems that was patched:

https://github.com/Hackerpilot/Dscanner/blob/8a1dc980109178a2be2a8a13c8522d82941b776d/src/ctags.d#L36

skl131313 avatar Feb 07 '17 16:02 skl131313

Using --catgs could probably also be a lot simpler and cleaner than what is currently in place. For now I can only compile the 0.4.0-beta.1 version, which isn't patched ; so it might take a while before getting the extension to use --ctags...

LaurentTreguier avatar Feb 07 '17 16:02 LaurentTreguier

Is there are reason you can only compile that version? I've been using the latest version.

skl131313 avatar Feb 07 '17 18:02 skl131313

Well, I have only tried the dub package, since this is what the extension uses... It gives me : Root package dscanner reference libdparse 0.7.0-beta.6 cannot be satisfied. (even though the package exists).

LaurentTreguier avatar Feb 07 '17 18:02 LaurentTreguier

It does the same using the current git version, only compiling with make seems to work.

LaurentTreguier avatar Feb 07 '17 18:02 LaurentTreguier

The problem was with one of dscanner's dependencies, dsymbol, I made a pull request but I don't think Hackerpilot is around that often.

skl131313 avatar Feb 08 '17 16:02 skl131313

It looks like he is still around, and there is now a new Dscanner release available ! I'll try to work on this as soon as possible.

LaurentTreguier avatar Feb 14 '17 15:02 LaurentTreguier

@LaurentTreguier Did you end up starting to work on this? If not I have some free time and might end up implementing it if you haven't started it already.

skl131313 avatar Feb 26 '17 01:02 skl131313

@sprinkle131313 I haven't been able to get Dscanner to take its input from stdin on Linux. It seems to work fine on Windows, but it crashes with an OutOfMemoryException on Linux (see https://github.com/Hackerpilot/Dscanner/issues/403). At least this is what I am getting.

LaurentTreguier avatar Feb 26 '17 09:02 LaurentTreguier

@LaurentTreguier I put in a pull request to fix it.

Now we'll have to wait for another release of dscanner... It'd be better to just make a fork of it and maintain a separate repo/dub package for use with dlang-vscode. Things just move too slowly when a single person has control over pretty much every tool that most IDEs use.

skl131313 avatar Feb 26 '17 20:02 skl131313

@sprinkle131313 that could be better regarding this issue, however I don't like the idea of maintaining a separate repo and fragmenting development tools... I don't know about @mattiascibien, but I know I don't have enough knowledge (at least right now) about D and Hackerpilot's tools to maintain such a thing. The best thing that could happen IMO would be if we could have Hackerpilot make more releases.

For now, I'll use your fork to start preparing the extension to use ctags.

LaurentTreguier avatar Mar 05 '17 12:03 LaurentTreguier

It wouldn't really require that much more knowledge. The problem with DScanner right now is that it doesn't get enough releases and there isn't anyone working on maintaining it. There's 3 pull requests sitting in the queue now that all fix the build.bat file. Which is a really simple easy patch to do. But the repo won't get updated cause HackerPilot is busy and no one else has the access rights to do the pull request. If we make a fork, we can do these pull requests ourselves and put up an updated version when we need to. Like in the case of this bug, its taken close to a month because of how slow work around DScanner is. I think he also said on irc he expects people using the tools to be programmers and to know what they are doing, as a reason why the dub version doesn't get updated as frequently. But that doesn't help in the case of this tool where using dub simplifies the building process to be cross platform with a single command.

It'd just be a way to speed up the process and fix simply bugs at a much faster rate than is being done now. It wouldn't really be maintaining it, as it would be simply striving to provide a faster release cycle. If we merge a pull request in that then gets changed in the main repo. We would simply rebase and match the changes once they finally get merged in hacker's repo.

skl131313 avatar Mar 05 '17 16:03 skl131313