EasyUI Forum
May 15, 2024, 08:52:37 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Stop Layout-Events on special parts of Page  (Read 10809 times)
Max Lamda
Newbie
*
Posts: 48


View Profile
« on: November 12, 2015, 03:31:47 AM »

I have some datagrids in my application which may contain quite many rows. If one of these grids is shown while I change the page, the application slows extremly down.

This is because after every change easyui thinks, that it has to rerender it.

But I know, that this is not nessassary because the place is not affected by the canges.

Can I prevent easyui to layout the datagrid once it is created?
Logged
Max Lamda
Newbie
*
Posts: 48


View Profile
« Reply #1 on: November 12, 2015, 05:02:47 AM »

One information:

Once the grid is created, it will not change its content anymore.

And it would be asolutely ok, if it does not respond to a resize of the browser anymore.

It is in a tab and if the tab shall be shown again (or hidden), chrome uses 35 percent CPU and you have to wait a hell of a time until the application is back.
Logged
StefaanEeckels
Newbie
*
Posts: 12


View Profile
« Reply #2 on: November 12, 2015, 07:41:45 AM »

Max,
What do you mean by "changing the page"? I use a datagrid in which fields are updated via Ajax, and the datagrid itself is not refreshed.
Take care,
Stefaan
Logged
Max Lamda
Newbie
*
Posts: 48


View Profile
« Reply #3 on: November 12, 2015, 08:57:36 AM »

The datagrid is in one region of a complex layout.

When I now try to load data into another part of the layout, the speed of this process depends on how many rows the grid - which will not be changed - has loaded.

So if there is a way to stop easyui to process the grid everytime some changes in the general layout occur.

btw: It slows down the application to an unusable state.
« Last Edit: November 12, 2015, 09:40:43 AM by Max Lamda » Logged
Max Lamda
Newbie
*
Posts: 48


View Profile
« Reply #4 on: November 12, 2015, 09:45:26 AM »

One other information:

First I tried to use the virual scroll view, but this does not work, if you do not know how many rows you can show, especially if the rows do not have a fixed height.

I really tried hard...
Logged
StefaanEeckels
Newbie
*
Posts: 12


View Profile
« Reply #5 on: November 13, 2015, 04:19:15 AM »

I use easyui-layout with a datagrid in the center region. The east and west regions are trees, the north region contains input fields. My datagrid does not load automatically (i.e. it does not have a "url" property, but it gets loaded using Ajax. Once loaded, the contents are not affected by changes in the other regions. So loading with Ajax is a solution.

If you load your datagrid through the "url" property, you could remove it after the data has loaded, using the onLoadSuccess event, something like this:

<table class="easyui-datagrid" id="dg" name="dgname" data-options="
    url: 'loadDatagrid',
    onLoadSuccess: function(data) {
        $(this).datagrid({url: ""});
    }
">

Without a url, the datagrid should stop reloading.
Logged
Max Lamda
Newbie
*
Posts: 48


View Profile
« Reply #6 on: November 16, 2015, 02:53:57 AM »

Yes, I load the data via ajax.

But the data is not reloaded, that is not the problem.

The problem is, that any layouting of the page slows down to unusability. There seem to be so many things Easy-UI checks on the long grid withouyt the need to do so.

So I am looking for a way to tell the datagrid: Keep calm, nothing is changed for you and just ignore what is happening here from now on (and it can stay that way).



Logged
StefaanEeckels
Newbie
*
Posts: 12


View Profile
« Reply #7 on: November 17, 2015, 02:49:41 AM »

How many lines do you have in the datagrid? In my application, resizing the east, west or south panels of the layout with 144 lines in the grid is nearly instantaneous. Inserting new lines in a datagrid is very slow (e.g. when loading or expanding a level) to the point users comment on it, but I've never observed unacceptable response times when resizing a datagrid. Can you give more details on the layout, the characteristics of the datagrid, and the type of change that triggers the rendering (In my application, the data inside the other panels of the layout changes constantly, without any effect on the datagrid in the center panel).
Logged
Max Lamda
Newbie
*
Posts: 48


View Profile
« Reply #8 on: November 17, 2015, 04:40:58 AM »

Let's say it can be 10k.

I now reactiveated the scrollview and fixed the problems that it contained.
Logged
StefaanEeckels
Newbie
*
Posts: 12


View Profile
« Reply #9 on: November 17, 2015, 07:34:23 AM »

10k -- that's a heck of a lot. No wonder my experience with a couple of hundred lines was irrelevant. Glad to hear you managed to fix it.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!