Completed
Last Updated: 26 Mar 2021 09:17 by ADMIN
Release R2 2021 (LIB 2021.1.329)
Curtis
Created on: 27 Apr 2020 19:31
Category: FileDialogs
Type: Bug Report
1
RadOpenFolderDialog: Improve loading performance

I'm not sure what happened here but this dialog box has gone from extremely slow to unusable.

Sure, I'm on a network but that shouldn't matter.  My local box is the initial folder and it's a normal, regular, business level working machine with a few hundred files in some folders and more/less in others.  NO FOLDERS with shocking numbers of files...  Yet this takes 2-4 MINUTES to load:

If Me.dialogOpenFolder.ShowDialog() = DialogResult.OK Then
    FolderName = Me.dialogOpenFolder.FileName
Else
    FolderName = ""
End If

The only other time this dialog is references is in FormLoad and here's that reference:

dialogOpenFolder.OpenFolderDialogForm.ThemeName = Windows8Theme1.ThemeName

 

I'd love to continue using this control since visually its light-years ahead of the built-in Folder Select dialog box...but as stated its unusable.

Is there *ANYTHING* I can do to speed this up?  It feels like its going out there and collecting all folder data from my entire network (which is massive) - can this be turned off or WISIWIG?

Any help would be lovely :)

 

 

 

 

4 comments
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 09 Jun 2020 10:22

Hello,

I would like to follow up with the following Knowledge Base article which gives some tips how the performance can be improved: https://docs.telerik.com/devtools/winforms/knowledge-base/improve-filedialogs-performance 

I believe that it would be helpful.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Curtis
Posted on: 05 Jun 2020 16:48

My machine is a 2 year old Windows 10 box.  There is nothing special about it that I could share. I had to abandon the Telerik control for that application because of the sluggishness as I mentioned.  I'm not in a position to switch back at this time.

I'll try to take a closer look next week - I know this reply doesn't help very much.

 -c 

Bill
Posted on: 05 Jun 2020 15:42

Hello Dess,

One of our other developers opened a case (Support ID:1470404) in which you directed us to this post.

We have had reports of 2 separate customers recently reporting the file dialog box is unusable (5-7 minutes to open). On one customer system the issue only occurs on a single PC, while a second non-related customer is experiencing this issue system-wide. Is it possible this is a result of a specific Windows Update?

We have several ( >2,000) installs that are not having any issues with this control, so it seems there must be something environmental occurring.  Can you confirm if this is indeed an issue on the Telerik end, or if we must make the software changes listed in your response? 

The OS build info for one PC having issue is 10.0.17134 Build 17134 and another PC from the site-wide customer is running 10.0.17763 Build 17763.

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 30 Apr 2020 10:56

Hello, Curtis, 

I can confirm that on some devices, mostly touch devices, our file dialogs may load slowly. Could you please specify on what device exactly you are using the file dialogs?

I have logged it in our feedback portal by making this thread public on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

I would like to note that all file dialogs are loading all directories and sub-directories of the predefined InitialDirectory and also all folders and their sub-folders that are visible on the MainNavigationTreeView on the left side. When a directory is loaded, the file dialogs are creating a DirectoryInfoWrapper object which subscribes for the Created, Changed, Renamed and Deleted events for this directory. This is the most time-consuming operation when loading the dialogs. A possible solution is to create a custom dialogs, which are not tracking the Created, Changed, Renamed and Deleted file and folder events. The performance on my side improved with 30-50%. Here is the code sample: 

    Public Class MyOpenFolderDialog
        Inherits RadOpenFolderDialog
        Protected Overrides Function CreateFileDialogForm() As FileDialogFormBase
            Return New MyOpenFolderDialogForm()
        End Function
    End Class

    Public Class MyOpenFolderDialogForm
        Inherits RadOpenFolderDialogForm
        Protected Overrides Function ShowDialogCore(Optional ByVal owner As IWin32Window = Nothing, Optional ByVal addWatcher As Boolean = True) As DialogResult
            addWatcher = False
            Return MyBase.ShowDialogCore(owner, addWatcher)
        End Function
    End Class

    Public Class MyOpenFileDialog
        Inherits RadOpenFileDialog

        Protected Overrides Function CreateFileDialogForm() As FileDialogFormBase
            Return New MyOpenFileDialogForm()
        End Function
    End Class

    Public Class MyOpenFileDialogForm
        Inherits RadOpenFileDialogForm

        Protected Overrides Function ShowDialogCore(Optional ByVal owner As IWin32Window = Nothing, Optional ByVal addWatcher As Boolean = True) As DialogResult
            addWatcher = False
            Return MyBase.ShowDialogCore(owner, addWatcher)
        End Function
    End Class

You can also skip a directory from being loaded in the file dialogs by cancelling the DirectoryRequesting event. Another hint to improve the loading time is to set the ShowNetworkLocations property to false. Its value indicates whether the dialog shows network computers in the navigation tree.

Additionally, when all directories are being traversed multiple exceptions like UnauthorizedAccessException, can occur. They are also consuming large amounts of time. You can track them by subscribing to the ExceptionRaised event of RadOpenFileDialog.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.