Performance Problem with Data Exporting

2 posts, 0 answers
  1. Nagisa
    Nagisa avatar
    14 posts
    Member since:
    Nov 2011

    Posted 23 Mar 2012 Link to this post

    I have a performance problem with Data Exporting.
    I export the data in gridview like following source,
    GridViewExportOptions exportOptions = new GridViewExportOptions();
    exportOptions.Format = format;
    exportOptions.ShowColumnFooters = false;
    exportOptions.ShowColumnHeaders = true;
    exportOptions.ShowGroupFooters = false;
    exportOptions.Encoding = System.Text.Encoding.Unicode;
    exportOptions.Items = ((QueryableCollectionView)gridView.ItemsSource).SourceCollection;
     
    gridView.Export(stream, exportOptions);

    or  output to clipboard like following source,

    System.Windows.Clipboard.SetText(gridView.ToText(((QueryableCollectionView)gridView.ItemsSource).SourceCollection, true, false));

    It takes over  30s to output data about 20,000 with PC that spec is Inter i7, memory is 8GB,
    and takes over 1min to output the same data with PC that spec is Inter dual core 2 1GHz, memory is 1GB.

    The time of processing is too long to me,
    there is any way to prompt the performance of outputting data ? 

    Best regards

  2. Nagisa
    Nagisa avatar
    14 posts
    Member since:
    Nov 2011

    Posted 23 Mar 2012 Link to this post

    By the way , I want to active busy indicator while exporting data.
    But I noted that I can't display busy indicator even though set BusyIndicator.IsBusy by true.
    I think the process of displaying busy indicator will be done after the command of exporting.

    My source likes following,

    public class ExportToFile : ICommand
    {
    ...
     
    public void Execute(object parameter)
    {

          // active busy indicator
        RaiseOnPreparingForCommand();
     
        RadGridView gridView = parameter as RadGridView;
      
     
        // initial context for exporting such as create exportOptions and getting stream to be wrote.
        ...
        gridView.Export( stream, exprotOptions);
        
              // disable busy indicator
        RaiseOnExportingCompleted();
    }
      
    }
     
    // delegate method set into PreparingForCommand event (executed when RaiseOnPreparingForCommand() is called)
    (s, e) =>
    {
        // I set the BusyIndicator into App.RootVisual when initializing App, and Page will be content of BusyIndicator.
        (BusyIndicator((App)App.Current).RootVisual).IsBusy = true;
    }
     
    // delegate method set into ExportingCompleted event (executed when RaiseOnExportingCompleted() is called)
    (s, e)=>
    {
        (BusyIndicator((App)App.Current).RootVisual).IsBusy = false;
    }

    How can I display busy indicator while exporting data?

    Best regards.
Back to Top