Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1528: OFIW dialog takes seconds to show

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Erik Olofsson Posted - Jul 06 2006 : 5:31:25 PM
This happens when you have many files opened in the editor.
8   L A T E S T    R E P L I E S    (Newest First)
support Posted - Dec 16 2011 : 1:56:27 PM
Open Files in Solution performance issue is case=19139, and is fixed in build 1862
Erik Olofsson Posted - Jul 07 2006 : 3:36:21 PM
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

support Posted - Jul 07 2006 : 1:40:21 PM
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.)
Erik Olofsson Posted - Jul 07 2006 : 10:52:10 AM
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
support Posted - Jul 07 2006 : 02:11:30 AM
Does the OFIW dialog open faster after the first time you open it?
rhummer Posted - Jul 06 2006 : 11:09:20 PM
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?
Erik Olofsson Posted - Jul 06 2006 : 7:18:43 PM
Sorry, I meant the OFIW dialog.
rhummer Posted - Jul 06 2006 : 5:57:32 PM
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..

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000