EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Pierre on April 21, 2016, 02:39:50 PM



Title: [SOLVED] Slow edit (parser problem)
Post by: Pierre on April 21, 2016, 02:39:50 PM
Hello
I have found that parsing of edit dialog is very slow if I have large datagrid (1000 or more records).
With other words, if I call edit dialog and after that this code:

Code:
        $('#div_temp').html(data);  // data contains my dialog
        $.parser.parse('#div_temp');

parser take 4-5 seconds if I have 1000 rows in grid.
If I have 50 or 100 records in the grid, it works normal.

It looks like parser do parsing whole screen and all grids each time dialog is opened.. is it possible to somehow parse only opened dialog because all my dialog's are modal?
Thank you.


Title: Re: Slow edit (parser problem)
Post by: Pierre on April 22, 2016, 09:28:22 AM
Stworthy, Jarry .. could you help please? It is real problem for me.
Thank you.


Title: Re: Slow edit (parser problem)
Post by: Max Lamda on April 22, 2016, 01:23:26 PM
I had (almost) the same problem.

I solved it by using virtual scrolling for the datagrid. This also speedends up your application by all other means.



Title: Re: Slow edit (parser problem)
Post by: Pierre on April 22, 2016, 10:52:42 PM
Thank you for idea. I'm using paging but there can be many thousands of records and I can not use pageList like [10,20,30,40,50]...
my pageList is [50,100,500,1000]
I'm afraid that using virtualScroll will not help because if I use too small pageList value, user need to scroll forever and if it is 100 or more records, he will quick have all records visible and problem will be the same.


Title: Re: Slow edit (parser problem)
Post by: jarry on April 23, 2016, 03:40:06 AM
The virtual scrolling is a better solution to display large amounts of records in datagrid. By setting the pagination bar, the user can change the current page or scroll the records smoothly.
Code:
$('#tt').datagrid({
    data: rows,
    view: scrollview,
    pagination: true,
    pageSize: 50,
    pageList: [50,100,200,500]
})


Title: Re: Slow edit (parser problem)
Post by: Pierre on April 24, 2016, 10:21:52 AM
Yes it works much better, thank you so much.


Title: Re: Slow edit (parser problem)
Post by: Pierre on April 24, 2016, 10:22:10 AM
I had (almost) the same problem.

I solved it by using virtual scrolling for the datagrid. This also speedends up your application by all other means.


Thank you.