# Ignition 8 power table configure cell make table very slow

**URL:** <https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717>\
**Category:** Ignition Early Access\
**Tags:** scripting\
**Created:** [February 29, 2020, 2:55pm UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717 "2020-02-29T14:55:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [February 29, 2020, 2:55pm UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/1 "2020-02-29T14:55:01Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/70d7ad8817bec83c785ba8e55607f4b7dad98516.png)  
upside is the logic in my project , when this scripting is use for configure the color of the column in 7.9.10  
but after i update the project to 8.0.8  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b42dae1e948adaa85d0596fb53139724aa63de54.png)  
it will make my table very very slow  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3612791409f79e8f302f79794eee8d02626267d0.png)  
while i can see nothing abnormal in the output console, currently my only choice is disable the function.  
can the expert explain why there are no fault in the 7.9.10 it is ok , but 8.0.8 it will fault?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 29, 2020, 4:28pm UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/2 "2020-02-29T16:28:35Z")

</div>

Don’t do any tag reads or database call inside such event/extension functions. Those calls must ask the gateway for information, adding huge round-trip latencies. In this case, inside the visual rendering of every cell of the table. Instead, use custom properties to bring all possibly needed tag and database information to the component and read those properties inside the event/extension function.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [February 29, 2020, 4:30pm UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/3 "2020-02-29T16:30:41Z")

</div>

You should put the value of the tag read in a custom property on the table and reference that property from the script.  
You also have access to the rowIndex, so no need to keep converting the data into a pydataset.  
Use something like this:

```auto

	config = {}
	if colIndex in [15,18]:
		lostTime = self.data.getValueAt(rowIndex,"LostTime")
		var = self.AlarmTime
		if lostTime > var:
			config["background"] = "#FF0000"
		else:
			config["background"] = "#00FF00"
	return config

```

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [March 2, 2020, 4:26am UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/4 "2020-03-02T04:26:54Z")

</div>

it works, thanks for your code

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [March 2, 2020, 4:27am UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/5 "2020-03-02T04:27:31Z")

</div>

understand, thanks a lot, i found many difference after my gateway update to 8 platform

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 2, 2020, 11:52am UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/6 "2020-03-02T11:52:55Z")

</div>

My advice in this topic is for all versions of Ignition, not just v8.

---

<div class="post-metadata">

**Author:** ![rrdiggy76](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rrdiggy76/32/3741_2.png) [@rrdiggy76](https://forum.inductiveautomation.com/u/rrdiggy76)\
**Post date:** [January 19, 2021, 6:16pm UTC](https://forum.inductiveautomation.com/t/ignition-8-power-table-configure-cell-make-table-very-slow/32717/7 "2021-01-19T18:16:54Z")

</div>

Reviving a solution to an older thread in case it helps anyone as it did me.

@pturmel and @jpark have the solution here. I too had awful latency issues with the client in general - even the diagnostics would hang after upgrading to 8.1.0 due to some tag reads inside powertable scripting.

The problem was never there on 7.9.x or below for us. Scripting to custom properties have seemingly resolved the issue.

Thanks
