# Bug: Move using a Pattern significantly slower than Copy using a Pattern

**URL:** <https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757>\
**Category:** Alumio Feedback\
**Created:** [October 4, 2023, 3:06pm UTC](https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757 "2023-10-04T15:06:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![floris](https://forum.alumio.com/letter_avatar_proxy/v4/letter/f/a3d4f5/32.png) [@floris](https://forum.alumio.com/u/floris)\
**Post date:** [October 4, 2023, 3:06pm UTC](https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757/1 "2023-10-04T15:06:16Z")

</div>

Hi Alumio,

I had a case where I wanted to change the structure of a very large array (40.000+). This took hours, so I tried finding out where the actual problem was.

It turned out the problem is in the ‘Move using a Pattern’. Basically my config was something like this:  
array.\*  
array.$1.key

Functionally in this particular case ‘Copy using a Pattern’ is the same as the ‘Move using a Pattern’. Since (either when doing this change or reverting back) you’re overriding the original value, they both lead to the same result. So it’s really a toss-up if a user will use the one or the other.

However, the ‘Move using a Pattern’ is significantly slower. It seems to scale badly with an increased array.

I’ve made an easy test:

- Chain Multiple
- Data Transformer
- Value Setter, with key `array` and value `string`, and with the mapper `List: fill with value` with a configurable upper limit
- Again a Data Transformer (so you’ll see it in the logs)
- Here either the Copy using a Pattern or Move using a Pattern, with the `array.*` `array.$1.key`
- Again a Data Transformer (so you’ll see it in the logs)

Outcome:  
**Upper limit of 1.000 items**  
Copy: 29ms  
Move: 350ms

**Upper limit of 5.000 items**  
Copy: 254ms  
Move: 8000ms

**Upper limit of 10.000 items**  
Copy: 222ms  
Move: 18000ms

**Upper limit of 20.000 items**  
Copy: 491ms  
Move: crashes, can’t do this in a test-run of a transformer

**Upper limit of 50.000 items**  
Copy: 1309ms  
Move: crashes, can’t do this in a test-run of a transformer

Although when it’s known that one transformer is slower than another, that’s not really a big issue, it should be well known. But I’m guessing it won’t be very difficult to improve the performance of this Move, and will benefit everybody.

If it’s not possible to significantly improve performance of the ‘Move Using a Pattern’, then please add the note “NOTE: This is much slower than a copy!” to your documentation!

---

<div class="post-metadata">

**Author:** ![floris](https://forum.alumio.com/letter_avatar_proxy/v4/letter/f/a3d4f5/32.png) [@floris](https://forum.alumio.com/u/floris)\
**Post date:** [October 4, 2023, 6:01pm UTC](https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757/2 "2023-10-04T18:01:19Z")

</div>

I’ve found another one with a similar issue: Key Filters using a pattern with an array.

So for example a Key Filter with a Pattern: `array.*.key`. I’ve compared this to a Node, Transform Nodes with a Key Filter _without_ the `*`.

I’ve used my previous test scenario:  
**Upper limit of 5.000**  
Key Filter: 16671ms  
Node Transformer with Key Filter: 222ms

**Upper limit of 10.000**  
Key Filter: 67000ms (yes, more than a minute!)  
Node Transformer with Key Filter: 488ms

---

<div class="post-metadata">

**Author:** ![r.candrian](https://forum.alumio.com/user_avatar/forum.alumio.com/r.candrian/32/235_2.png) [@r.candrian](https://forum.alumio.com/u/r.candrian)\
**Post date:** [October 11, 2023, 6:28am UTC](https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757/3 "2023-10-11T06:28:00Z")

</div>

Hi @floris,

Thank you for your feedback. We will pass this to the corresponding team to further checking.

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [December 8, 2023, 10:25am UTC](https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757/4 "2023-12-08T10:25:14Z")

</div>

Hi @floris

We would like to inform you that we have made an improvement to the “Move using a Pattern” transformer since version 3.48.0. You can read our full release notes for the version here [Alumio version: 3.48.0-RC1](https://forum.alumio.com/t/alumio-version-3-48-0-rc1/857).

The version is now available for production environments as well. Could you please give it a try now?

---

<div class="post-metadata">

**Author:** ![floris](https://forum.alumio.com/letter_avatar_proxy/v4/letter/f/a3d4f5/32.png) [@floris](https://forum.alumio.com/u/floris)\
**Post date:** [December 8, 2023, 12:31pm UTC](https://forum.alumio.com/t/bug-move-using-a-pattern-significantly-slower-than-copy-using-a-pattern/757/5 "2023-12-08T12:31:46Z")

</div>

Hi @Gugi ,

It’s now around the performance of the copy action, so that’s good!

Tested on 3.49.0-RC2  
**Upper limit of 1.000 items**  
Copy: 29ms (measurement from last time)  
Move: 29ms

**Upper limit of 5.000 items**  
Copy: 254ms (measurement from last time)  
Move: 159ms

**Upper limit of 10.000 items**  
Copy: 222ms (measurement from last time)  
Move: 350ms

**Upper limit of 20.000 items**  
Copy: 491ms (measurement from last time)  
Move: 605ms

**Upper limit of 50.000 items**  
Copy: 1309ms (measurement from last time)  
Move: 1769ms

**Upper limit of 100.000 items (new)**  
Copy: 6105ms  
Move: 6698ms

**Upper limit of 500.000 items (new)**  
Copy: 20000ms → Worked  
Move: got a memory error
