Feature/Enhancement

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Feature/Enhancement

Postby fantasticjamieburns » September 11th, 2014, 3:02 am

Background
==========


I work with many large projects on a day to day basis and like a lot of people in the PHP community use Git for version control and Composer to manage dependencies in the "vendors" folder. Working with these technologies in PHP Tools has been a really frustrating experience for me. I am using the latest version of the PHP Tools plugin at the time of writing (1.14.5514).

Problem #1 - Switching branches in Git
======================================


I regularly switch branches within a project under Git version control.

This presents a problem to me using PHP Tools because when I switch a branch, files and folders often change (added/removed) leaving me with a broken project to "fix". We do not commit IDE project files into Git, so there is no easy way that I know of manage this.

My current method to work around this problem is to Exclude certain top level folders and then Include them again. This is not ideal because there are often files or folders deep in the tree that have been Excluded individually for various reasons, and by Including from top level folders that information is lost and I end up with a lot of files that I do not want to see. It is also a pain to identify those folders for each project before I start working on the branch and go through the process.

Would you consider making this workflow easier?

A great solution would be aware of a project using Git, and maintain a copy of the Excluded file/folder list outside of the main project file, and reapply the appropriate exclusions for a given branch name when it is detected (on Window Focus for example).

Problem #2 - Updating Vendors
=============================


I regularly update the Composer dependencies for a project using the command line.

This presents a problem to me using PHP Tools because I cannot be sure if files or directories have been added or removed as part of the update. Where files or directories have been added, I lose visibility in Solution Explorer and intellisense support. Where files or directories have been removed I am left with a Solution Explorer tree littered with warning sign icons.

My current method to work around this problem is to Exclude the top level "vendors" folder and then Include it again. This is not ideal because the vendors folder on most of my projects is rather large and it takes a very long time.

Excluding the "vendors" folder currently takes 3 minutes on a Core I7 machine, with Visual Studio consuming 100% of a single core running at 3GhHz. To compound the problem, the entire IDE is blocked from being used whilst this happens so I cannot do any other work on the code, instead I see my old friend:

excluding.png


Including the "vendors" folder again currently takes 10 minutes on a Core I7 machine, with Visual Studio consuming 100% of a single core running at 3GhHz. Again, the problem is compounded by the entire IDE being blocked from use whilst this happens so I cannot do any other work on the code, instead I see my other old friend:

including.png


In summary, to update the vendors folder takes up 13 minutes and blocks the IDE whilst it does this. I often sit, dissatisfied, wondering what kind of algorithm is being used that could possibly take that long to include and exclude the folder.

For your reference, the folder used when timing the operations above contains 9,780 Files inside 2,063 Folders - a modest Symfony2 project.

Would you consider making this workflow easier?

A great solution would be the ability to mark a given folder as "Auto Sync", so that I don't even have to think about it again. Of course the performance problem would need to be addressed first, and the sync should happen in a background thread.

If you really wanted to make your product shine, an interface a little like the NuGet Package Manager that worked for Composer install/updates would be fantastic.
You do not have the required permissions to view the files attached to this post.
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am

Re: Feature/Enhancement

Postby Miloslav Beno » September 12th, 2014, 3:12 pm

Hi Jamie,

Thank you very much for this great and detailed feedback. We're going to use these scenarios for the improvements in the next releases.

Problem #1

We'll have to discuss this scenario here. Have you tried using Visual Studio Git support? That should eliminate a need to use include/exclude.

Problem #2

Direct Composer support in PHP Tools is planned for 1.15. So that should make your life easier.

Anyway Include/Exclude performance is also objective for the next update.

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Feature/Enhancement

Postby fantasticjamieburns » September 12th, 2014, 9:19 pm

I'll give the VS Git support a revisit. Last time I tried, it wasn't useful enough to stop me from using the command line and so I ended up not using any part of it. I will try just using it to switch branches - thanks for the advice.
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am

Re: Feature/Enhancement

Postby Jakub Misek » September 13th, 2014, 3:55 pm

Hi,

We have improved performance of Include/Exclude by about 90%. The fix will be available within the next update.

There was a bug in underlying framework performing Solution Explorer refresh for every file and folder.

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Feature/Enhancement

Postby Jakub Misek » September 13th, 2014, 5:01 pm

Hi,

There is an updated version improving include/exclude performance at http://www.devsense.com/products/php-to ... ad/preview

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Feature/Enhancement

Postby Miloslav Beno » September 18th, 2014, 2:38 pm

fantasticjamieburns wrote:I'll give the VS Git support a revisit. Last time I tried, it wasn't useful enough to stop me from using the command line and so I ended up not using any part of it. I will try just using it to switch branches - thanks for the advice.


Please give me know how does it go for you. It'd be interesting to know your experience.

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 11 guests

User Control Panel

Login

Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 5 minutes)
Most users ever online was 787 on May 12th, 2024, 11:50 am

Users browsing this forum: No registered users and 11 guests