Perform the Solution Browser cache update in the background

Post general DPack questions or problem reports here.

Moderator: Sergey

Perform the Solution Browser cache update in the background

Postby joshnorton » April 4th, 2013, 4:45 pm

Hi Sergey,

I'm using VS 2012 with a solution that has quite a few (some also large) projects. Each time I open the solution the Solution Browser scans each project (I have configured it to persist the cache in my User Data folder but I presume it's checking to ensure the cache is current?). This happens lightning fast on a per-project basis but it still takes a while to scan the sheer number of projects my solution contains.

Currently this is done in the foreground and a modal dialog box is displayed every time a project is scanned (example attached). Would it be possible to do this in the background, without the dialog box? I wouldn't mind being forced to wait if I actually go to use the Solution Browser, but in the first few minutes of opening a solution I don't tend to use it, so this is just an unnecessary start up time increase.

Regards,
Josh
Attachments
usysware.png
The Solution Browser scan window that comes up modal per project.
usysware.png (12.67 KiB) Viewed 17687 times
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 5th, 2013, 7:06 pm

Hmm... interesting request. Makes sense though. Let me give it some thought please.

Are you aware of Solution Browser option (Tools|Options ...) that allows you to change cache option persistence? Default in-memory option is what causes it to be re-scanned on each solution load. You could modify it to sore it in solution folder and then you'll have to incur scan wait just once. Not quite what you were asking for but that might get you past long wait. Thanks.

Edit: I missed it where you said you use that option already. :oops: I'll double check if works fine but are you saying it scans for it each time? What's your OS btw? Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 7th, 2013, 1:06 pm

In my internal tests I don't see progress dialog more than once, ie when it scans the solution for the first time. It then continues to reload the cache on solution open. You must be running into some project structure changes that cause the dialog to pop up. Could you confirm that please? Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby joshnorton » April 14th, 2013, 6:29 pm

Hi Sergey,

I'm on Windows 7, using a fully up-to-date VS 2012. My solution was upgraded from VS 2008 (.Net 3.5) to VS 2012 (.Net 4.5).

Could you clarify what you mean by 'project structure changes'? It's pretty much guaranteed that I will have added or removed class files between solution loads but other than that, I don't often change the project/solution structure, at least, not as often as I get the rescan.

I took a screen capture of my solution loading twice in a row so you can see what happens to me. You can download it here: [url]https://www.dropbox.com/s/h13lsc24o5fpjsv/Usysware.mp4[/url] (I'll delete it in a week or two).

I attached the output of the dpack logs but they don't seem to say much about what's going on here. Are there other log files produced that you'd like to see?

Regards,
Josh
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 14th, 2013, 8:36 pm

Hi Josh,

Just watched your mp4. Wow, that looks wacky. :shock: It's definitely doesn't work how it was intended. Or I should amend that - I've never seen it work that way so I suspect DPack reacts to some project structure changes, which is project load/unload, project/file deletion, new file creation, etc., ie anything that could result in Solution Browser reported changes. Those changes are then propagated to Solution Browser cache updater, which pops up update dialog.

In your case it seems as if it's detecting project load condition for each project in the solution. Could you enable DPack logging, force it to do that same thing again, close VS and post DPack log folder logs here please?

I suspect though that perhaps it has something to do with source control system. Is your solution under source control (Tools|Options -> Source Control)? If so, which one do you use?

Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby joshnorton » April 14th, 2013, 10:43 pm

Hi Sergey,

The solution is under source control. It's using VisualSVN as the source control provider.

Sorry, I thought I had attached the log files in my earlier post. It seems I didn't. I've attached the log files this time.

Regards,
Josh
Attachments
DPack logs.zip
(66.22 KiB) Downloaded 724 times
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 15th, 2013, 11:29 pm

Reproduced it with a project large enough and Git source control provider installed. I think it's a VS 2012 asynchronous solution loading feature kicking in, messing up DPack. Need to do some research on how to work around it. If I recall it there is nothing on VS SDK side that would allow me to even detect that. Anyways, need to investigate it further. Thanks for bringing it up.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby joshnorton » April 16th, 2013, 12:32 am

Thanks for looking into it. My solution is definitely being loaded asyncronously.

Do you even have to display the modal dialog boxes? Could you instead maybe display a "please wait..." message in the Solution Browser control that you remove once the scan operation completes? It's more the interuption that's bothering me rather than the action.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 16th, 2013, 8:38 am

joshnorton wrote:Do you even have to display the modal dialog boxes? Could you instead maybe display a "please wait..." message in the Solution Browser control that you remove once the scan operation completes? It's more the interuption that's bothering me rather than the action.


Agreed but the problem is 2 fold though. 1 - projects seem to be reported as not there and then as newly added when solution is loaded asynchronously. This should be handled in one shot w/o it even having to go through the cache refresh. And 2 - UI blocking cache refresh shouldn't be ideally blocking and instead use the status bar indicator as you had suggested. That'll be trickier a bit but shouldn't be too bad to change. This all could be addressed incrementally, ie fix issue #1 and #2 won't be as big of an issue all of a sudden. Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 22nd, 2013, 9:10 am

Spent some time over the weekend looking into that and I'm pretty sure I got it fixed. As I suspected once unnecessary project structure changes caused by async solution loading in VS 2012 aren't registered anymore, the Solution Browser cache doesn't get invalidated anymore and the whole problem goes away.

I modified DPack to load Solution Browser cache once async load of the entire solution's been completed. The side effect is that Solution Browser cache won't be made available until after solution is fully loaded but it's a small price to pay. This rather small change is for VS 2012 as VS 2010 doesn't support async solution loading.

I can post a beta version for you if you're willing to give it a try. Need to fix a JavaScript parser regression I've introduced but other than that it's in a good shape.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby joshnorton » April 22nd, 2013, 3:20 pm

Thanks Sergey, that's great. I don't mind waiting until the next release, you don't need to post a beta for me (unless you want me to test it). I've gotten used to leaving my solution open for days at a time now. :)
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 22nd, 2013, 10:28 pm

joshnorton wrote:you don't need to post a beta for me (unless you want me to test it)


Yeah, I wouldn't mind if you give it a try please. Seems to work fine here but just to be sure. I've posted a private v3.7.1 beta 2 for you to try (May ETA release):

http://www.usysware.com/files/DPack2010-3.7.1.Beta2-Setup.exe for VS 2010
http://www.usysware.com/files/DPack2012-3.7.1.Beta2-Setup.exe for VS 2012

Thanks!
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby joshnorton » April 23rd, 2013, 1:18 am

The beta works wonderfully. The progress dialog is no longer displayed when I load the Solution and the Solution Browser control continues to function perfectly.

Thanks a lot!
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Perform the Solution Browser cache update in the background

Postby Sergey » April 23rd, 2013, 8:44 am

Great. Thanks for confirming it for me.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Perform the Solution Browser cache update in the background

Postby joshnorton » June 2nd, 2013, 9:42 pm

Hi Sergey, the beta's expired. Could you please post a new one?

Regards,
Josh
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Next

Return to DPack Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron