The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
We are fetching almost 2k-3k rows data from datatable to populate in grid. It takes around 1 minute to populate data in tree grid. We also using data filter to filter data from datatable, it takes another 1 minute to filter data from datatable and to populate in grid. How to reduce the time when multiple users fetching data at same time in production environment.
Hi @AP_10343008 Create an index for each set of filter criteria commonly used under DataTable > Configuration > Index Settings
look at the below reference article.
https://www.ptc.com/en/support/article/CS363996?source=search
Have you checked how that time is spent? Is it in execution of the service that gets the data, or in moving over the data to the client, or in the widget trying to render it?
In Grid, All child rows taken from datatable. But Parent rows and its values will be calculated dynamically during execution. As childrows are 2500 in count in datatable, it might take lots of time to add parentrows for every 3 or 5 childrows.
As Surya wrote, try to use indexing, but to be honest, that's a lot of items to show in a tree...
You could also share your code so readers could look into it.
ok. Can we pull the data/ populate it in grid when user scrolling the grid ?
I think you would need a collection for this. But even then, to be able to render a scroll bar, the system would have to know how many items there are. If indexing doesn’t solve the issue, maybe rethink the UX. How many of those 3k rows are actually needed by the user?
Compare with Google Search, they give you millions of results, yet they don’t show them to you, but just 10 at a time.
Hi @AP_10343008 ,
I observed the reply, but you still did not answer @Rocko's question, and we need to do that before providing an effective advice.
We need to know the following:
Items 1 and 2 you can take from Developer Tools/Network tab - let me know if you need more know how on how to do that. Item 3 you can manually time based on 1 and 2.
Only based on these items we should be able to provide an efficient answer.
1. 2.5k rows fetched from datatable in 12 secs. But it took one minute to add parent rows dynamically with its calculated value. Then output will be passed to the treegrid. It Renders quickly in 1 or 2 secs.
2. Customer wanted to see all the rows by changing the filters often in ptc filter widget.
Can we show treegrid format in pagination?
Do we have any event which gets triggered on scroll from treegrid?