opista/svn-blamer

Add some indication that the plugin is working during blame retrieval

metacurb opened this issue · 10 comments

Currently all logs are retrieved when the blame is applied. It would be more efficient to grab the log when a line is hovered, to reduce the initial wait.

Currently all logs are retrieved when the blame is applied. This means that a large number of unique commits can take a long time to be retrieved.

Add some sort of indicator that tells the user whether the plugin is working or not during this (potentially long) period.

Just at the moment, I can't tell if the plugin is simply not working, or taking its time doing this. Is there any particular progress (or error) feedback it gives that I should look out for?

(just found this half-written in a tab while I was having a purge, apologies if double-posted or whatever)

I agree with @xinaesthete I had the same reaction when I started using your plugin yesterday. In the end it works but it's still a bit off-putting at first.

Valid points. Maybe an indicator of some description in the bottom panel could work?

I may rename this issue, and create a new one for the initial problem, because they are different issues but one happens as a result of the other

Bottom panel is certainly where I would expect to find a bit of an indicator. I notice as well that the console 'output' tab has sections for individual extensions, so I guess some more detailed logging could be done there if necessary. I've never looked under the covers of a VSCode plugin up to this point so don't know too much about the inner workings, but may well have a few things I want to dabble with at some point.

FWIW, I don't think I've seen any results from your plugin, either on Windows or Mac. Same repo in both cases... not sure how it compares with others... a few different projects from the past several years in the same repo, including quite a bit of stuff that has no real business being in source control... but then, there's never been more than half a dozen or so people working on any of it, mostly only a couple of us... so I imagine it's a lot less heavy than a lot of other repos out there...

Hey @xinaesthete , I'll definitely take a look into this when I get a moment (unless you fancy taking a look yourself, by all means!)

In regards to returning the blame, do you see any errors when this happens? I'm surprised that you aren't returned some kind of message.

The amount of time the plugin takes is dependant on the number of unique commits within a file. The plugin essentially grabs the file's blame, checks for unique commit numbers, and then grabs the log for each of those. So the more unique commits within a file, the longer it will take.

I have re-purposed this issue to hopefully resolve the problem that you and @jflambert have raised, and then create a new one for attempting to increase the efficiency of the plugin itself. (Again, help is always welcome! :) )

Hmm. Just tried again (on mac) and for the first time I'm seeing an error message:

svn: E170013: Unable to connect to a repository at URL 'svn://myfileaddress' svn: E210002: Network connection closed unexpectedly

Seems ok via another SVN extension / command line... I guess this may be more to do with Mac compatibility (although I'd have thought it should work similarly to Unix). I'll give another try on Windows at some point.

FWIW:
$ svn --version svn, version 1.10.0 (r1827917) compiled Sep 25 2018, 18:25:22 on x86_64-apple-darwin17.0.0 ....

Definitely happy to help with Mac compatibility if necessary btw.

@xinaesthete there is already an issue regarding mac compatibility, found here

Quick update: I have for the first time seen some actual useful output from the plugin... but it was on a launch.json file with trivially few associated commits. I'm getting the same errors mentioned above on other files in the same repo (relatively infrequently changed ones, but not as infrequent as launch.json).

On the plus side, it seems to work just as well on Mac.

It looks like VS Code StatusBarItem would be the best place for this.