View Full Version : Performance issue when rendering buttons in grid

5 Sep 2012, 1:28 AM
Hi All,

I am using an ExtJS 4.0.7 grid that has a column with a renderer that renders buttons.
here is the exact same code

If i have two rows having such buttons then for small number of records say 100 it works just fine.
But when number of records goes above 1000 it goes terribly slow.
Note that i am using JSON data to populate grid.

How can i speed it up?

5 Sep 2012, 1:51 AM

why don't you use an actionColumn for that? It just displays icons (no performance hit) and allows to define a handler when the icon is clicked ...


5 Sep 2012, 2:18 AM
What if i want to render a combobox rather than a button?

5 Sep 2012, 2:25 AM
In addition to that
when i sort or filter there will be new components created for each row.
what about the old components? Will they get destroyed?
Wouldn't that cause memory leakage?
Do we have anything like 'autoDestroy' when detached?

5 Sep 2012, 3:15 AM
What if i want to render a combobox rather than a button?

then you define a combo editor type for that column.

14 Sep 2012, 4:10 AM
Can somebody mark it as unanswered?
Its not answered.
Is it a compulsion to use Image buttons or editor grid etc when my requirement is putting an ExtJS combo box or ExtJS Button in grid cells?
If 'yes' i am sad that ExtJS is not that customizable.

14 Sep 2012, 4:57 AM

you asked about performance of grid, not about possibility to insert whatever you want to.

You can use whatever you want as an element of an grid, but if you're adding a bunch of lets say 1000 combo-boxes that will bloat your DOM, attach a whole lot of events an each and every combo and this will seriously slow down your browser. The same is for a button, a lot of DOM interaction, a whole lot of events ....

You could try to add a 1000 combo boxes to a panel, even that will be VERY slow, even in Chrome ...

So, you are free to add any component to a grids' cell but not in every case this is the performance-wise best solution.