Silverlight 4.0 - Memory crash with 20.000 data to display - silverlight

I've a radiantQ gantt control and 20.000 data recived from wcf service to display. When less data to display it works like a charm. But i need to diplay 20.000 records and all browsers crash-freeze. Is there any way to solve this problem? Increasing isolated-storage may works?
thanks.

#halil ibrahim,
Please contact RadiantQ Technical Support and we will provide you hints on how to optimize gantt usage with large amounts of data.

Does application crash in rendering mode (when you display data on UI)? - You can use virtualization mode. You can try create one more thread (task or use background worker) and display parts of data to UI in "stack" mode. Do not load all data on first step. It should work. I tried do it: load of 1000+ data items from service and display it on UI.
Does application crash in process of receiving data from service (when you call a service method)? - You should configure your service. Increase max receive message size, etc. It depend on service, which you use.

Related

How to load heavy data?

I am getting 5000 list of user and their details from server and am trying to show those records . Records are displayed but am seeing continues loading.. and after loading am not able to do anything. Is there any solution to load 5000 records without loading and crashing?
The problem with loading 5000 records isn't (only) that you're receiving a lot of data, but that Angular has to process all that in the digest cycle. I'll bet that if you do a profiling in the browser, you'll find most of the CPU time is spend in the digest loop.
To avoid that you have to only allow a limited number of DOM elements on the page at a time. As suggested, one way of doing this is using paging.
Another way, where you still load your 5000 records, is to use a concept called virtual repeat/scroll, where you have a directive that only shows the elements that can fit in your viewport (i.e. on the users screen) and then whenever the user scrolls, the directive adds more elements below, while removing elements that goes out of view. This can be done seamless and can have a huge impact on performance.
Virtual repeat/scroll can be a difficult task to create on your own, but fortunately there are several different implementations available. I have experience with Angular Virtual Scroll ngRepeat directive but there are others out there that work just as well.
It is not advised to load 5000 records at once and try to display the same in the browser. You need to do use paging. You cannot load some heavy data onto browser. It might crash or does not respond. Use paging to bring only 10/20/30 records at a time and provide paging buttons , so user can click and navigate to the desired page.
An article on how you can do paging: http://www.c-sharpcorner.com/article/server-side-pagination-using-angularjs-web-api-and-sql-server/
--If you are using WebAPI

Extjs gridpanel performance issue with local data

I am working on a grid that users may load xml file and do editing via grid panel. It works well with around 200 rows. However some users may want to load 50000 records at a time.
When I try to load a file with 10k records, firefox crashes and chrome waits too much. After some debugging I realized that rendering the data to panel requires too much time. for every new row I need to refresh the grid which requires too much time again.
One important point is, the xml file never comes to the serverside, we read it with extjs and load to the grid.
Is is possible to load whole data to store but request a certain amount of data to render the panel view?
I tried inifinite grid but cannot make it work since my data source is a string. What do you offer to manage 50k data.
I've had a similar issue with ExtJS in the past while trying to load very large grids. Let me just say at the outset that it's certainly not their fault - 50,000+ records is just way too much data. To get around this problem I resorted to using paging.
Have a look at their documentation for a paging toolbar.
Here is an example.
My only other suggestion would be to use an infinite grid, but write a file conversion wrapper over your XML data to convert it to JSON.

Access 2010 Database - Front ends that do not require web server?

background
I need to be able to display charts that can capture what the user has clicked on. So for a pie chart, if a user clicks on a pie piece, I should be able to capture which piece he selected. Scatter plot should capture what plot, etc. Access-UI can't capture these things, only that a user clicked on the graph. So I need a different solution.
problem
We do not have access to a web server. The front end needs to connect directly with the access database. So what front end solutions can I use that will give me the UI flexibility I need to solve my problem?
possible solutions?
Use silverlight in access (http://desktopweb.blogspot.com/2010/12/using-silverlight-with-access-part-ii.html)
Winforms that connects to Access database via ADO
Is there anything that allows me to use HTML/JS or flash? HTML/JS would be the best solution, followed by flash just due to its wide support. I was researching Web Browser Control but I am not completely clear on whether it is opening local HTML files or browsing through http. I also wasn't clear if it supports JS or can load Flash.
When you first said about the click though capability my first thought was the reporting that is possible using SSRS. The easiest way is to have a reporting server and have the reports available through a browser. However you say you can’t have a web server so I’m guessing that a reporting server is also out.
You could however still use BIDS or report builder to make your reports and then the report viewer control in a flavour of .net to display the reports. Note that you have to convert them to RDLC files and feed the data to them.
That’s my 2p worth, I won’t comment on flash or silverlight as I don’t know enough about them to make an informed recommendation
The web browser control that's usable in Access can use any resource that can be reached via a URL, or you can assign a string of HTML (valid, of course) to it. I forget the exact property you use for the latter, but it's doable (I didn't know this the last time I implemented a web browser control to display HTML from an Access app, so created a temp file, and never went back to replace that with just assigning the HTML directly once I learned how -- so I forgot how, of course!).

Silverlight - Unable to load a lot of data

I have a Silverlight application that has a DataGrid and a DataPager. The data source for these controls comes from a database. I am accessing this database through RIA Services.
When I try to load all of the records, I receive an error that says:
"Load operation failed for query 'GetData'. The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error."
By gradually restricting the size of the result set on the server side, I have come to the conclusion that I am getting this error because my data set is too large. My question is, how do I elegantly load large data sets into a DataGrid? I am open to approaches outside of RIA Services.
Thank you!
First off, if you have the means and aren't required to write this code yourself, consider buying a UI component that solves you problem (of find an open source solution). For these types of tasks, there's a good chance that someone else has put a lot of effort into solving problems like this one. For reference, there's a teleric grid control for Silverlight with some demos.
If you can't buy a component, here's some approaches I've seen:
Set up a paging system where
the data for the current page is
loaded, and new data isn't loaded
until the pages are switched. You
could probably cache previous results
to make this work more smoothly.
Load data when needed, so when the user scrolls down/sideways, data is loaded once cells are reached that haven't had data loaded.
One last idea that comes to mind is to gzip the data on the server before sending. If your bottleneck is transmission time, compression speed things up for the type of data you're working with.
You should take into consideration that you are possibly exceeding the command timeout on your data source. The default for LINQ to SQL for example is 30 seconds. If you wanted to increase this, one option is to go to the constructor and change it as follows:
public SomeDataClassesDataContext() :
base(global::System.Configuration.ConfigurationManager.ConnectionStrings["SomeConnectionString"].ConnectionString, mappingSource)
{
this.CommandTimeout = 1200;
OnCreated();
}

How to increase the performance of WPF Application

I have developed WPF Application. In that application iam loading 200mb photos to the listbox.After that Iam adding those images to canvas.While adding photos to canvas after sometime (i.e; after adding 10mb images)iam getting Some error like ----
*****The CLR has been unable to transition from COM context 0x10b46f0 to COM context 0x10b4860 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.*****
Is there any way to increase the performance of my application. I need a solution for this problem.
Any Suggestions for this.
Don't load all 200 mb of photos into the listbox all at once on your UI thread. Will the user be looking at 200 mb all at once? It'll take some work on your part, but you're going to need to do some delayed loading of the images from a background thread.
Take a look at this article (Advanced Techniques To Avoid And Detect Deadlocks In .NET Apps), it may help.
This looks like two questions, the first is that you are loading images in a background thread, but not doing it correctly; thus, the COM error. Double check that you are have a STAThread application and that the image loading thread is not interacting with the WPF dispatch thread incorrectly. Here's a discussion MTA vs. STA; however, WPF needs STA, and it's a loosing battle to fight it.
The second question seems to be how should one do this; that is, loading a bunch of images for display. I would look into using a lazy data binding of the ListView and let the virtualizing presenter that's built into is manage the loading/display of the images.
Here's some docs on using a view-model. The viewmodel could coordinate the image load and provide the ListView with a binding source that would automatically get the application working.
A simpler alternative might be to start up a background thread and load the images into an ObservableCollection<>, bind that to the ListView and let the framework deal with the display.
I second what Greg D said, loading 200mb of images sounds like a recipe for problems.

Resources