Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1528: OFIW dialog takes seconds to show
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Erik Olofsson
Tomato Guru

111 Posts

Posted - Jul 06 2006 :  5:31:25 PM  Show Profile  Reply with Quote
This happens when you have many files opened in the editor.

Cutting Edge Project Management
http://www.hansoft.se

Edited by - Erik Olofsson on Jul 06 2006 7:17:31 PM

rhummer
Tomato Guru

USA
527 Posts

Posted - Jul 06 2006 :  5:57:32 PM  Show Profile  Reply with Quote
Whats the number of symbols listed in the title bar of the dialog? Is it alot? WIth the soltuion I'm working it, it lists 142,140 symobls which takes a few secons to show which I would expect form the sheer number..

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

Erik Olofsson
Tomato Guru

111 Posts

Posted - Jul 06 2006 :  7:18:43 PM  Show Profile  Reply with Quote
Sorry, I meant the OFIW dialog.

Cutting Edge Project Management
http://www.hansoft.se
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Jul 06 2006 :  11:09:20 PM  Show Profile  Reply with Quote
Er, sorry thats my fault I was thinking of the FSIW dialog.

How many files are shown in teh OFIW dialog when it opens?

The soultion I referenced above is ~2200 files and it opens pretty damn fast, which I usually have about 10+ files open in my IDE

Do you have the "Show only files in the current workspace" checked?

What IDE, and any other plugins?

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64


Edited by - rhummer on Jul 06 2006 11:10:17 PM
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jul 07 2006 :  02:11:30 AM  Show Profile  Reply with Quote
Does the OFIW dialog open faster after the first time you open it?
Go to Top of Page

Erik Olofsson
Tomato Guru

111 Posts

Posted - Jul 07 2006 :  10:52:10 AM  Show Profile  Reply with Quote
When I do Window->Close All Documents it will be fast.
When I have 400 documents open in the editor it takes about 3 seconds for the dialog to show.
When I click in Show only files in the current workspace it's fast again.

I think under some circumstances it will be slow with less number of files open. Maybe it's debatable if it should be fast with 400 files open, but I hit this problem pretty often. If it's easy to optimize, maybe it's worth taking a look at anyway.

IDE: Visual Studio 2005
No other plugins

Cutting Edge Project Management
http://www.hansoft.se
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jul 07 2006 :  1:40:21 PM  Show Profile  Reply with Quote
Unclicking "Show only files in the current workspace" tells VA X to include open files, whether or not they are in the current workspace.

We're not sure how many people have 400 documents at once, but that's driving the three seconds. VA X has to ask the IDE for info on each. (Speeding the process normally means we abandon anything related to a standard API provided by the IDE.)
Go to Top of Page

Erik Olofsson
Tomato Guru

111 Posts

Posted - Jul 07 2006 :  3:36:21 PM  Show Profile  Reply with Quote
I can live with only the files in the workspace. Now when I tried again I got 10 seconds for 398 files. Thats 26 ms per file. That's a huge amount of time. In that time I you could render a whole frame for a modern 3D game! After restarting Visual Studio this went down to about 2 seconds.

Now This didn't make sense, so I debugged Visual Studio and checked what was taking time. You seems to call Item(x) on something. Every call seems to enumerato all documents and put them in a list that is then indexed!

I created a testcase with Visual Basic script that does the same thing that you do and if I call Item(x) three times per file it seems to take about the same amount of time that your dialog take. There is a GetEnumerator() available on DTE.Documents property. Using this (foreach in VB macro) I got the following times:

Number of documents: 398
Time for Item(): 1218.75 ms
Time for IEnumerator(): 46.875 ms

My VB skills are a bit lacking but the code:

   Sub Macro_CountDocuments()

        Dim nObjects = 0

        nObjects = DTE.Documents.Count

        Dim ItemTimerStart As DateTime
        Dim ItemTimerEnd As DateTime
        Dim EnumeratorTimerStart As DateTime
        Dim EnumeratorTimerEnd As DateTime

        If 1 Then
            ItemTimerStart = DateTime.Now
            For i = 1 To nObjects
                Dim Docu = DTE.Documents.Item(i)
                Dim Docu0 = DTE.Documents.Item(i)
                Dim Docu1 = DTE.Documents.Item(i)
            Next
            ItemTimerEnd = DateTime.Now
        End If


        If 1 Then
            EnumeratorTimerStart = DateTime.Now
            For Each Docum In DTE.Documents
                Dim Docu = Docum
                Dim Docu0 = Docum
                Dim Docu1 = Docum
            Next
            EnumeratorTimerEnd = DateTime.Now
        End If

        OutputWindowLog("Number of documents: " + nObjects.ToString() + vbCrLf)

        Dim FileTimeStart = ItemTimerStart.ToFileTime()
        Dim FileTimeEnd = ItemTimerEnd.ToFileTime()
        OutputWindowLog("Time for Item(): " + ((FileTimeEnd - FileTimeStart) / 10000.0).ToString() + " ms" + vbCrLf)
        FileTimeStart = EnumeratorTimerStart.ToFileTime()
        FileTimeEnd = EnumeratorTimerEnd.ToFileTime()
        OutputWindowLog("Time for IEnumerator(): " + ((FileTimeEnd - FileTimeStart) / 10000.0).ToString() + " ms" + vbCrLf)
    End Sub


Cutting Edge Project Management
http://www.hansoft.se
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Dec 16 2011 :  1:56:27 PM  Show Profile  Reply with Quote
Open Files in Solution performance issue is case=19139, and is fixed in build 1862
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000