Giter VIP home page Giter VIP logo

Comments (13)

mayerwin avatar mayerwin commented on August 16, 2024

Can you confirm what is your version of Visual Studio, and if you're using other extensions?

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

If the issue is consistent, it'd be good if you can temporarily try removing [tfsBranchName] from the pattern to see if this is related to this tag (which does take some time to resolve, though normally it should be asynchronous).

from vs-customize-window-title.

amorpheus avatar amorpheus commented on August 16, 2024

Microsoft Visual Studio Professional 2017
Version 15.9.11
VisualStudio.15.Release/15.9.11+28307.586
Microsoft .NET Framework
Version 4.7.03190

Extension use is relatively minor, one internal one that has a few helpful shortcuts, ReSharper, and a few of the Power Tools.

I'll try removing the branch tag and see how it goes.

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

For reference: https://resharper-support.jetbrains.com/hc/en-us/articles/115001013390--We-ve-noticed-that-extension-ReSharper-Ultimate-is-slowing-Visual-Studio-message-

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

Hum, it is very much possible that [tfsBranchName] is causing the slowness, as it is the only tag that needs to run on the UI thread for the resolution:

Globals.InvokeOnUIThread(() => name = TfsHelper.GetBranchNameFromLocalFile(Path.GetDirectoryName(sn)));

I need to check if there is a way to run it outside the UI thread, but I remember I added this invoke because it was otherwise throwing exceptions.

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

https://github.com/mayerwin/vs-customize-window-title/blob/master/CustomizeVSWindowTitle/Resolvers/TfsBranchResolver.cs

from vs-customize-window-title.

amorpheus avatar amorpheus commented on August 16, 2024

Thanks for the updates. Is resolving the branch name something that needs to ping the TFS server, or where could the slowness happen?

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

Yes, apparently with TFS it needs to ping the server, which is slow. But this alone is not a problem. The problem is if we have to run this on the UI thread.

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

Do you think I could cache the result of the branch name for a particular solution file?

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

Is it guaranteed to not change (my instinct tells me that it can change if the branch is switched while the solution is still open in Visual Studio)?

from vs-customize-window-title.

amorpheus avatar amorpheus commented on August 16, 2024

Personally, I don't think I would ever need my VS title to adapt to a new branch name after opening a solution. Maybe checking the branch name could depend on other variables that trigger it?

from vs-customize-window-title.

mayerwin avatar mayerwin commented on August 16, 2024

I prefer to be safe and always recheck if it can change (otherwise it can cause bad surprises for users). Since the branch name change could be triggered outside of VS, I'm afraid there is no event we can hook to to refresh only when strictly needed. But anyway it shouldn't be a problem if we can run this asynchronously.

Can you try the following release 4.3.1, where I am running the offending line on the threadpool thread, and let me know if you see any error in the debug or notice any slowness, or crash?

CustomizeVSWindowTitle (4.3.1).vsix.zip

Just extract the vsix file (GitHub doesn't allow to upload vsix files) and install it, it should overwrite the existing version (and keep the link with the auto update if I push a new version on the gallery).

from vs-customize-window-title.

amorpheus avatar amorpheus commented on August 16, 2024

Got it running now and it seems to work just fine. :)
Thanks!

from vs-customize-window-title.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.