Skip to content

Infragistics Community Forum / Cross Platform / Ultimate UI for Xamarin / How-to Get Best Performance With Large Amount Of Data

How-to Get Best Performance With Large Amount Of Data

New Discussion
Akshay
Akshay asked on Feb 20, 2009 11:22 AM

Hi,

    We are using Infragistics controls in our project. We are really concerned about the performance of the controls espically the UltraWebGrid which we are using. There is a huge amount of data that is being displayed in the grid(more than 400 rows and 80 columns) and lots of client side functionalities also. Presently the performance is really poor. Please suggest some ways to increase the performance.

I just wanted to know something about the infragistics support. Like

1. How fast the queries are answered?

2. If we want some additional functionalities to be implemented then is it possible for you people to implement it or not and if yes then how much time will it take?

3. The project we are working on is a really big one and requires a very good perfomance. Will infragistics UltraWebGrid and other controls be able to provide such a good performance?

 

Akshay

Sign In to post a reply

Replies

  • 0
    Mark
    Mark answered on Oct 1, 2008 12:23 PM

    You're putting a grid with 400 rows and 80 columns onto a webpage and you're worried about performance? Before the grid's performance even becomes an issue you might want to check to see what best practice is in developing web-based applications. Your proposed solution sounds barmy.

    Dear God, man! That's a 282kb file before you even start looking at data, never mind CSS class names, images, viewstate, client-side code. Why would you even consider doing this?

     

    class Program

    {

    static void Main(string[ args)

    {

    using (FileStream s = File.Create("c:\\BigHtml.html"))

    {

    StreamWriter sw = new StreamWriter(s);

    sw.WriteLine(

    "<html>");sw.WriteLine("<body>");

    sw.WriteLine(

    "<table>");for (int row = 0; row < 400; row++)

    {

    sw.Write("<tr>");for (int col = 0; col < 80; col++)

    {

    sw.Write("<td></td>");

    }

    sw.WriteLine("</tr>");

    }

    sw.WriteLine(

    "</html>");sw.WriteLine("</body>");sw.WriteLine("</table>");

    }

    }

    }

    • 0
      Akshay
      Akshay answered on Oct 1, 2008 1:12 PM

      I totally agree to what you are saying but still I wanted some suggestions which I can implement and enhance the performance.

      I implemeted customised pagination to reduce the number of rows to 40 and columns are also reduced to 15. But still the performace is less compared to existing window application which works with same data.

      If you can put some suggestions they will be highly appreciated and can solve my problems.

       

      Akshay

      • 0
        Mark
        Mark answered on Oct 1, 2008 1:28 PM

        Akshay, you'd be well-advised to keep your data display to a minimum, as you have done. Remember, one web server will have to serve multiple clients and you can't tell when they all might decide to jump on at once.

        Unfortunately,it's extremely unlikely you're ever going to have the same kind of performance on a web page that you get with a Windows grid but a couple of things you might want to try include

         

        1. Switching ViewState off: if this grid is a report, and there is no need to edit data using the standard methods

        2. If you are editing data in-place in the grid, stop. You'll give your users a much better experience if you allow them to edit the row in a separate edit area.

        3. If the customers absolutely positively have to have this data via http, you might find it easier to generate an Excel report for them using the Infragistics Excel export tools, rather than going through all the render issues.

        4. Examine the various page caching options provided by ASP.Net

        I hope you get some ideas from the above and wish you well as you start getting used to the compromises you have to make when moving UI-intensive applications from the desktop to the web.

        Mark

      • 0
        Akshay
        Akshay answered on Oct 1, 2008 1:40 PM

        Mark,

                I think your suggestion will be highly useful. Thanks.

        Akshay.

  • 0
    Edward McCarroll
    Edward McCarroll answered on Oct 1, 2008 8:37 PM

    Performance often depends a lot on what you are doing.  I once revesed the sort order of a medium-sized dataset and it more than quadrupled the response time.

    To see what others have done, use the Search function at the top of the page.  Look for "performance" and (separately) for "slow".

    And please keep in mind the fact that, when a WebGrid perfoms well, nobody ever posts anything like "Hey, everyone, my WebGrid has a wonderful response time."  ðŸ˜‰

    • 0
      Tom
      Tom answered on Oct 1, 2008 11:34 PM

      My UltraWebGrid is performing fine!  It's the display that is currently giving me troubles right now 😉

       I implemented a custom (outside of webgrid) paging solution that displays 20 rows and 5 columns.  Was going to try virtual scrolling, but limitations on my db access prevent that for now…

       I'm still looking for every eke of performance I can get, I am going to see what script combing does for me.  See: http://blogs.infragistics.com/blogs/tony_lombardo/archive/2008/07/28/script-combining-what-s-the-big-deal.aspx

      So far, as a (paying) customer for a week now, I've been impressed with the support I've gotten both here in the forums, and via their chat interface.

      • 0
        [Infragistics] Rumen Stankov
        [Infragistics] Rumen Stankov answered on Oct 2, 2008 4:07 AM

        Hello All,

        This is turning out to be a great thread on performance in general – thanks to everyone contributing. My take on this is that Webforms (ASP.NET) will always be slower in general than desktops, especially on IE – DHTML / Javascript is a completely different platform and has its pros and cons.

        As far as grids in particular are concerned, here is what I can suggest:

        0. Check out the help documentation for performance tips:

        http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Performance.html

        1. Use profiling tools to see where the problems is. Sometimes the problem can be at the datasource layer (slow SQL query). Sometimes it can be server-side processing (the C# server-side code). Sometimes it can be slow loading time (maybe – a lot of HTML generated). Sometimes it is the browser itself that is sluggish (client-side / javascript problems). Knowing where the bottleneck is makes things much easier.

        2. Use server side data caching. That is, never execute a complex and time consuming SQL query twice – store the result (for example DataTable in the application Cache and then retrieve from there on rebind).

        3. Use ASP.NET Page Caching. That is the OutputCache directive. ASP.NET has a great great caching infrastructure built-in – through OutputCache you can customize caching in many ways (and invalidate cache when needed when data changes with Sql Dependencies, or through time dependency, etc)

        4. Play with ViewState. Sometimes in some scenarios it is possible to turn ViewState off (EnableViewState = false) and then rebind from cache in each postback to server. ViewState off will reduce the HTML size signifficantly.

        5. Script combining may also work fine (it was already suggested by a customer here, check out Tony Lombardo's post on our forums)

        6. Install a ZIP add-on for IIS. There are many ZIP compression Add-Ons for IIS. ZIP compressors typically zip the IIS response and browsers decompress it on the client – this may speed things up a LOT. Just make sure you are using popular ones and test before deployment. I've seen page load times go up 5-6 times just because of that.

        7.  Use Paging – either built-in or custom – it is unlikely that your end-users need more than 20-30 rows at a time, so PageSize > 20 will just make the requests slower whie not helping end-users a lot.

        8. Use Load On Demand / AJAX. The grid has at least 4 different modes of that (Virtual Scrolling, AJAX, LoadOnDemand) – check out the samples and help for that – fetch only the data you need to display and load the rest when user interaction occurs.

        9. Change the interface. I am not sure many end-users will be able to cope with 80 columns and 400 rows at once. I myself find it difficult to even read more than 5 columns and 20 rows at a time (this is 100 cells with data). You can show the rest of the rows with paging and / or AJAX, while for the columns – you can show them on row click in a different window, HTML placeholder, or even in our great WebDialogWindow component.

        HTH, and keep the feedback coming – great stuff.

  • 0
    PROCOS PROCOS
    PROCOS PROCOS answered on Feb 20, 2009 11:22 AM

    – It can also help alot if you try to use short identifiers of css class names, element ID's, Javascript Functions, etc. Especially when u have large grids with lots of columns and rows.

    – Check out the  "OptimizeCSSClassNamesOutput" property this does what i described directly from Infragistics, so the grid renders more Compact.

    – Setting style/appearance property at top most level
    We in our company make really heavy use from Infragistics Appearances in our Fatclient, and we had to port this to web. So pay attention how you build your Grid on the server side. Keep the defaults in mind and set the stuff on the server side only exactly when its needed. If you iterate through cells in the Webgrid on server and set some style/appearance properties, this will have a direct inpact to the html. Because then everycell has the style directly set (not through CSS identifiers). Never set any properties on a level where you can set a property on a parent level. (If the row itself has backcolor=red, avoid setting it on the cell) I know this sounds simple and clear but its very important to always keep this in mind. A wrong implemented appearance on server side can heavily destroy performance.
    We get so far in our company that we created "CSS styled" appearance merge logic for infragistics appearances… 

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Akshay
Favorites
0
Replies
8
Created On
Feb 20, 2009
Last Post
17 years, 8 months ago

Suggested Discussions

Created by

Created on

Feb 20, 2009 11:22 AM

Last activity on

Feb 20, 2009 11:22 AM