# Ccx - bad performance with a large number of element sets

**URL:** <https://calculix.discourse.group/t/ccx-bad-performance-with-a-large-number-of-element-sets/108>\
**Category:** Uncategorized\
**Created:** [August 10, 2020, 12:50pm UTC](https://calculix.discourse.group/t/ccx-bad-performance-with-a-large-number-of-element-sets/108 "2020-08-10T12:50:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://calculix.discourse.group/u/patrick)\
**Post date:** [September 10, 2020, 5:51am UTC](https://calculix.discourse.group/t/ccx-bad-performance-with-a-large-number-of-element-sets/108/5 "2020-09-10T05:51:14Z")

</div>

I had a look at the source code, and I guess you know that, but the two functions allocation.f and calinput.f are slow for large element sets (due to the loops).

The following times are for 280k element sets, time in sec  
total\_time;2385.17334  
readinput;1.39676  
fort\_allocation;170.82869  
fort\_calinput;527.75238  
init\_var;0.00001  
descascade;0.00000  
det\_struct\_mat;6.15488  
linstatic\_stress1;0.18480  
linstatic\_stiffness;2.77373  
linstatic\_stress2;5.35357  
spooles\_factoring\_MT;1642.99561  
spooles\_solve;14.96334  
spooles\_cleanup;8.86842

The approach with temperature values instead of element sets would work, it is a lot faster, but there are some [issues](https://calculix.discourse.group/t/temperature-dependent-materials/120/5) which I dont understand, thus I have to live with the bad performance atm.

I have an idea how to improve the performance with user defined materials, but I haven’t implemented it yet. I will give feedback if I have done that.

---

_[View the full topic](https://calculix.discourse.group/t/ccx-bad-performance-with-a-large-number-of-element-sets/108)._
