-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable performance issues #2023
Comments
Probably this is a result of removing trackBy function. Please, return it. We can`t migrate to newer version because of that. |
But trackBy causes a problem, leaving it empty breaks the table and data does not change. |
why not have a default trackBy if it is left empty? |
Referencing similar issue #1877 |
If the table needs to render many columns, we can see the same performance issue.
|
Noticed performance issues as well - some of our tables can be 22k row (with pagination). |
I am seeing the same issues, with even 100+ rows being returned it freezes the browser. I'm even using server side pagination, so the API is only returning 100 rows, and returning within about 1s. This is using Angular2 and a local API as well. |
Thanks we will review. |
RowTrackBy has been added in 4.0.1 by #2633 |
How is rowTrackBy used? |
Same as ngForTrackBy, consult the docs of Angular please. |
Using the rowTrackBy made my datatable slower. I am only loading 200 rows at a time from the server using pagination. The table is then only 375px showing about 15 rows at a time and 7 columns. Without rowTrackBy is about 6 seconds for a row click to highlight the row, with rowTrackBy it increases to 7 seconds for the row to highlight. I am using version 4.0.1 with Angular 4.1.3. The rest of the browser functions are very slow as well with only 200 rows. Below is the function I am calling from [rowTrackBy] with the table being a collection of "parts". trackRow(index: number, part: Part): number { |
Provide a plunkr please. |
same problem demo with 500 entrys |
Thanks we will review for 4.0.3. |
+1 for this. Just tried to use it with 2000 rows, and it is very slow taking > 5 seconds to render the table once the data is loaded, and row selection, editing fields etc... are unresponsive. |
the same performence Problem with p-accordion
|
It is better to divide each case of DataTable into separate tickets for example, we've added a performance boost for selection in; Other one is; We're trying the best we can do from our side, however for 1K+ rows the number of bindings increase so we may hit a wall. I'd suggest pagination if that is acceptable. In the end, lazy or non-lazy, pagination can deal with large datasets or virtual scroll. Closing as we're adding different tickets for each improvement. |
Appreciate all your efforts working on this project, I know it must be a lot of work. Quick question around the 1000+ rows performance impact: Do you know if there something fundamentally different about some of the other Angular grids that do seem to be able to handle a lot more data? E.g. if you look at http://demos.wijmo.com/5/angular/benchmark/benchmark/#/flexgrid you can load 1 million rows into some of the grids seemingly without any significant performance penalty. |
That example does not really render 1000+ rows, it is similar to the VirtualScroll mode of DataTable which again same as pagination. I'd like to see what happens when you push 1000 rows to the dom. |
We're still digging this, it seems number of columns has a huge factor, I've tried code of @cyberrranger with 2000 rows on 3 columns and result is quite acceptable. Increasing columns significantly slows down it, I've then removed all the column content like editable cells or so and just kept simple readonly content to display the column field value which resulted in 2000K rows with 9 columns perfoming really well, no delays on mouse interactions. I think we've found our bottleneck. |
we are facing a real performance issue even when the table contains only few rows, compiling in dev mode the only issue is with the reordering of the column that work very slow. |
Please provide a plunkr that simulates your case and we'll review. |
This happens because of DataTable add dragover listener to DOM and huge amount of dragover events trigger detect changes cycles. So, if you have low optimized application it will be suffer while trying to reorder columns. Especially in dev mode. There is also bottleneck: functions that cause paint reflow are called in dragover handler which triggers huge amount of paint reflows |
Hi Oleg,
thanks for your reply, when this change will be available on version that I
can pull from npm?
Eilon
…On 13 July 2017 at 00:56, Oleg ***@***.***> wrote:
This happens because of DataTable add dragover listener to DOM and huge
amount of dragover events trigger detect changes cycles. So, if you have
low optimized application it will be suffer while trying to reorder
columns. Especially in dev mode.
Here is my pull request that optimize dragover handler making run it
outside of angular and not provoking detect-changes cycles. dd40ddd
<dd40ddd>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2023 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQmwpGSzLfSW4RZqurOxM1f3nIbtBgDlks5sNUD-gaJpZM4L7WCZ>
.
|
Hi Eilon, |
thanks Oleg,
great solution works like charm
…On 13 July 2017 at 11:32, Oleg ***@***.***> wrote:
Hi Eilon,
this question is for guys from PrimeNg, i don`t have rights to merge to
master. But you can test fixes above using forked version "primeng-ua":
"^4.1.0"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2023 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQmwpJjSX2_xBCDpwoyJV-8yF6n6HeLUks5sNdYWgaJpZM4L7WCZ>
.
|
Merged, thank you. Performance gain is significant! |
Is there any example on how RowTrackBy is used? |
I'm using primeng datatable from latest version 4.2.2 but there is still huge performance problem.
|
Iv noticed in the code that there are places where property is bound to methods - like |
In my case datatable with ~3000 rows is not practically useful at all. The whole browser becomes unresponsive with any key press. |
I realized that if you enable production mode in application, performance of datatable will significantly improve ! solved my problem. |
I have a Datatable with 2200 records with 12 columns and even after doing all the things mentioned in this thread, It is still lagging like anything. Scrolling takes 4-5 seconds and binding of the grid itself takes 40-50 seconds. |
Really waiting for the TurboTable ! |
Hi , can you please let me know hot to download "primeng-ua": "^4.1.0" jar |
@jyothipallati primeng ist not with Java (.jar), here we use Typescript (.ts) |
Are any updates on performance optimizations with primeNG table? 500 rows blocks screen for a 4sec |
Current behavior
Observing below issues with DataTable
Expected behavior
Minimal reproduction of the problem with instructions
DataTable with 10 columns and each column has multiselect filter with column data as filter options. Performance issue can be observed when number of rows increases. try with 500, 1000, 1500, 2000, etc... rows
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Operating System: Windows 7
Angular 2.4.6
PrimeNG : 2.0.0
Chrome 56.0.2924.87 (64-bit), IE11
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: