# High CPU When Reporting. Clock Drifts. Excel Format. 17 Pages. Thread Dumps

**URL:** <https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216>\
**Category:** Ignition\
**Created:** [November 2, 2020, 7:22pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216 "2020-11-02T19:22:45Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 2, 2020, 7:22pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/1 "2020-11-02T19:22:45Z")

</div>

I have a report that uses a table group. With 17 peer tables set to break on pages.

I’ll get timeout exceptions when I’m emailing from the designer or trying to save to file and the CPU will go above 70% and will take about a min to complete.

All data keys come from dataset tags. At first, they were named queries. So I made them into tags thinking that was the issue. Because this query can take almost 500ms to run. And there isn’t a whole lot I can do to improve it right now…

PDF or CSV finishes in like five seconds.

Is there anything I can do? So this doesn’t use so much CPU? There isn’t a lot of styling on the cells. there is none basically. Two thread dumps when it was trying to generate an email.  
[Ignition-IS-DP-IGNITION\_thread\_dump20201102-132047.txt](https://forum.inductiveautomation.com/uploads/short-url/Y0DVeVhHNivRLeZBrEMVQlJzPI.txt) (384.5 KB)  
[Ignition-IS-DP-IGNITION\_thread\_dump20201102-132055.txt](https://forum.inductiveautomation.com/uploads/short-url/5A0rrJPg4UeBaWW95dzjz7eguih.txt) (503.8 KB)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b06012d86ed8cb59b65944b239dec1c9648a1066.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/d/2dc7d5d30a60be66328df1e7903f0e324b10924a.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/1/21096e944ec1b3cbfd95e2b2050af4761e353601.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/8/58c9920b5f88f279eee2acdabc71df24070366fd.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/6/467d1595b210f6316db19ee8b90418ab2d865699.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/c/4ce39c90c78746991bc142fbb5ba25dc9eaf9b70.png)

---

<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:** [November 2, 2020, 8:33pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/2 "2020-11-02T20:33:43Z")

</div>

This has been noticed by others, and it is the Excel format conversion that is both a memory and CPU hog. /:

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 2, 2020, 8:42pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/3 "2020-11-02T20:42:10Z")

</div>

Yikes. I wish I would’ve known this before I committed to doing it… 😆

---

<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:** [November 2, 2020, 9:59pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/4 "2020-11-02T21:59:28Z")

</div>

If outputting to excel, why not just write to a dataset and then use system.dataset.exportExcel or exportCSV ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 2, 2020, 10:04pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/5 "2020-11-02T22:04:04Z")

</div>

We have some work pending review and QA targeted at 8.1.1 that improves the memory usage of `system.dataset.exportExcel`. Not sure if that matters here.

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 2, 2020, 10:04pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/6 "2020-11-02T22:04:04Z")

</div>

I am working on trying that right now. I’ll report back with details. If its any less resource intensive. I’m on 8.06 and going to update to 8.1 over thanksgiving. So I could name the sheets then! Which is bonus I don’t think I could get from the Reporting Module.

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 2, 2020, 10:14pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/7 "2020-11-02T22:14:15Z")

</div>

```auto
Traceback (most recent call last):
  File "<input>", line 15, in <module>
AttributeError: 'com.inductiveautomation.ignition.designer.gui.tool' object has no attribute 'toExcel'

```

```auto
## Specify the paths
#paths = [
# "[default]D01/D01/Data/Database/Production/Produciton.Value",
# "[default]D02/D02/Data/Database/Production/Produciton.Value"
# ]
# 
## Send the reads off
#results = system.tag.readBlocking(paths)

var = system.tag.read("[default]D02/D02/Data/Database/Production/Produciton.Value")
print var.value

spreadsheet = system.dataset.toExcel(True, [var.value])
filePath = "C:\\Ignition Reports"
system.file.writeFile(filePath, spreadsheet)

```

I don’t guess you can do this from script console. 😑

---

<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:** [November 2, 2020, 10:17pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/8 "2020-11-02T22:17:20Z")

</div>

> [@Kevin.Herron](#):
>
> exportExcel

exportExcel

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 2, 2020, 11:29pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/9 "2020-11-02T23:29:41Z")

</div>

@Kevin.Herron

exportExcel() is only available in vision scope?

Since I am only on 8.06 : [system.dataset.dataSetToExcel - Deprecated Ignition Features - Ignition Documentation](https://docs.inductiveautomation.com/display/DEP/system.dataset.dataSetToExcel)

What is a sequence of datasets? is it not a list? This script makes a corupted .xls

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/f/2f6dfb83b6157a89795ea6135106cbbe379815f8.png)

```auto
	#Specify the paths
	paths = [
	           '[default]D01/D01/Data/Database/Production/Produciton',
	           '[default]D02/D02/Data/Database/Production/Produciton'
	        ]
	 
	# Send the reads off
	values = system.tag.readBlocking(paths)
	 
	# Here we can examine each value
	
	table = [values.value for values in values]

	
	
	
	excelstr = system.dataset.dataSetToExcel(True,[table])
	
	fileName = 'dump.xls'
	system.perspective.download(fileName,excelstr)

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 3, 2020, 4:50pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/10 "2020-11-03T16:50:42Z")

</div>

I think 8.0.6 in particular had an issue with the excel functions. Latest 8.0.16 shouldn’t, if you can do a ‘minor’ upgrade before thanksgiving (8.0.17 should be out ~soon, too).

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 4, 2020, 4:01pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/11 "2020-11-04T16:01:27Z")

</div>

Is it advisable to update to a higher minor version anyway. Before updating major versions? Out of curiosity.

8.0.6 – 8.1.0

8.0.6 - 8.0.16 - 8.1.0

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 4, 2020, 4:12pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/12 "2020-11-04T16:12:37Z")

</div>

There shouldn’t be any real reason to (especially between 8.0 and 8.1, they’re not nearly as far apart as some major version gaps).

---

<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:** [November 4, 2020, 5:08pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/13 "2020-11-04T17:08:13Z")

</div>

> [@paul-griffith](#):
>
> they’re not nearly as far apart as some major version gaps

🤣

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [November 4, 2020, 6:34pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/14 "2020-11-04T18:34:25Z")

</div>

Would you say it’s advisable to update to the highest minor version? Before upgrading a major version.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 4, 2020, 7:19pm UTC](https://forum.inductiveautomation.com/t/high-cpu-when-reporting-clock-drifts-excel-format-17-pages-thread-dumps/40216/15 "2020-11-04T19:19:46Z")

</div>

I would generally advise updating as often as possible to the most recent minor version. Obviously that isn’t practical in all scenarios, but the entire reason we’re continually releasing is to fix various bugs.

We take great pains to ensure upgrades work seamlessly, so there should _not_ be any requirement (nor would I call it a best practice) to go to `latest_minor` before going to `new_major`.

So, as a non-answer - no, I wouldn’t say it’s advisable - but it doesn’t hurt anything to do it, either. As always, the key point of advice is to collect a .gwbk before doing _any_ upgrading.
