Open eaenriquez opened 1 month ago
@eaenriquez why do you need so many data grids on one page?
Hi @tmcconechy it is for us to simulate a real-world usage like how some of our customers will be using a lot of datagrids on a single application (sometimes within tabs, sometimes within a single page)
Ok. We can take a look. I think this one will be very hard. However we can look at not changing headers unless columns change
Yes, I think that would suffice in this case. Should I also make another ticket as to investigate how the icons are being rendered ?
@eaenriquez probably enough here. If we cant fix that under this can make a new issue (have doubts its easy to change)
@eaenriquez why do you need so many data grids on one page?
Hi @tmcconechy, just to shed some light on as to why... In M3 Experience Designer, customers can configure their own business applications with our WYSIWYG editor. We have one customer that created an app with 37 (! - not recommended...) datagrids (in different tabs etc). It seems like these filterable columns, creating the icons for the filterable options (~6+ for each column unless one has limited the options) especially (correct me if I'm wrong @eaenriquez) is taking a lot of resources. If we can only have this done once, when the datagrid get it's options/settings and/or when columns options are changed, that would be a great performance gain.
Not sure why the creation of the icons takes a lot of time, but perhaps one could just look to see if that could be sped up first, if you think it would be hard changing how the datagrid is creating/destroying the columns?
yeah it would be hard to completely change how columns are rendered. Maybe there is a speed up available somewhere. And not rendering headers if not needed should be doable. Will check. One idea maybe is to use the icon font instead of svg? I think there was an issue with that however.
Would like to try and make a standalone test page? So 32 grids with 10-20 columns? And 200 rows? Does that sound about right?
Still ranking this as 2-3 weeks of work for one developer.
Hello @tmcconechy, I went ahead and created the other ticket that is more specific to the issue of having filters on the column headers. So if in case that it will be handled differently then it would under that ticket.
Otherwise, if the performance of when having filters is solved here too, such as the performances for load time initially and setting records, then feel free to just close that one.
Describe the bug The current observations with the datagrid are:
To Reproduce To replicate the issue, we need an environment where we can toggle the data and the columns. We did that in a replication project with M3 ExD. Please follow the setup and the steps to reproduce.
Setup:
npm i -y
npx nx run m3:serve
, then openlocalhost:4200
in Chrome browserSteps to reproduce the behavior:
libs > shared > ui > components > src > lib > ids-datagrid > ids-datagrid.component.ts
. line 22 has no icons, line 23 has icons, just pick one to comment out and the other to render.Expected behavior We only need to render the headers once after we set the columns setting of the datagrid to be optimized. We might need to check why icons are taking time to load too.
Version
Screenshots In our applications, this is the impact of the re-renders: Without Icons:
With Icons:
PS: see bottom parts of the picture to see the total times that the icons are taking
Platform