Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 443193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:08:46+00:00 2026-05-12T21:08:46+00:00

Displaying a View inside a Region is about 5-10 seconds slow for the first

  • 0

Displaying a View inside a Region is about 5-10 seconds slow for the first time, and UI freezes for that period in my Prism Composite WPF application. In subsequent times View is loaded relatively faster without any UI freezing. View is composed of a Devexpress WPF Grid control and data is fetched from a SQL database. I don’t think its an issue with the Grid control / binding though, even if I remove bindings with the grid control, View takes almost same time to render itself into a Region.

This is the code I use to load View into a Region defined inside the Shell:

public Action<MenuModel> LoadViewRequest { get; set; }

public SyncController(IUnityContainer container, IEventAggregator eventAggregator, IRegionManager regionManager)
{
    this.container = container;
    this.eventAggregator = eventAggregator;
    this.regionManager = regionManager;
    this.LoadViewRequest = (menuItem) => { LoadRequestedView(menuItem); };
    this.eventAggregator.GetEvent<ViewRequestedEvent>().Subscribe(LoadViewRequest, ThreadOption.UIThread, true, i => i.Module == "Sync");
}

private void LoadRequestedView(MenuModel menuItem)
{
    try
    {
        IViewModel viewModel = this.container.Resolve<SynchronizeViewModel>();
        this.regionManager.Regions["ViewRegion"].Add(viewModel.View);
        this.regionManager.Regions["ViewRegion"].Activate(viewModel.View);
        viewModel.DisplayName = menuItem.Description;
        this.eventAggregator.GetEvent<ViewNotificationEvent>().Publish(menuItem.Description);
    }
    catch (ResolutionFailedException) { }
}

What could be the reason behind this behavior? Why View is getting loaded almost instantaneously when loaded for the second time? Does that mean even after removing View from the Region my application hold a reference to View?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:08:46+00:00Added an answer on May 12, 2026 at 9:08 pm

    Most likely, your View is loading all of the Dev Express and any other Assemblies into memory and JITting them. We see a similar thing in our UI when using the Infragistics WPF Controls.

    Edit: You cannot really avoid this. The Assemblies need to be loaded and will be JITed on the first run. You can try pre-loading the Assemblies during start up and pre-jitting the assemblies. You won’t be able to simply execute this on another UI thread, because now your grid will be owned by different thread than your container, so it will not work.

    In a Data Grid, you will see a significant amount of time being spent drawing the elements. Usuaully what will happen is that the grid control will create all of the row and cell UI elements and will need to bind those to your data. All in all, a rather large number of WPF UI elements will be created which, inherently, takes up a decent amount of time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a list view inside that in item template i am using
First post time, I've been playing around with MVC abit... I have a view
I have a UINavigationController inside a UITabBarController. When a user presses the first tab,
I am suing Listview and customize listview to display image inside a list item.
I have made a kind of Video Slider, where thumbnail of videos are displaying
I've an image gallery, that displays images in a 5X5 matrix. Each image has
After only a few weeks of working with Drupal I've come up with a
I am using ASP.NET MVC2 with NHibernate, but am facing an issue. All calls
i wish to create a reusable ASP.NET MVC ViewUserControl which is strongly typed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.