Hi Alumio,
Comparable to the other topic I started about move using a pattern, I’ve now found the same for Move using a Key Accessor (but figured I’d start a new topic to keep issues separated).
In many cases you’ll have an incoming that returns an array. That’s quite annoying, since it’ll make a lot of mutations difficult. So you start by moving that array into an “array” node. I saw one incoming that took around 25 min, and figured I’d check to see what the issue was.
The issue turned out to be the Move using an Accessor. I’ve created a tester (see under) that tests the performance of that move vs. other ways to move. Just 5.000 items in an array takes around 18s.
The Move using a Pattern which was recently improved takes about 100th to 1000th of the time.
After I replaced the Move using a Key Accessor (from-key: empty, to-key: “array”) with a Move using a Pattern (from-key: *, to-key: “array.$1”), the time of the incoming went from 25 minutes to 3,5 seconds.
This is the test-config I used:
{“$schema”:“https://di.schema.alumio.com/register.configuration.json",“type”:“list-transformer”,“identifier”:“performance-move-using-accessor-tester”,“name”:"Performance Move Using Accessor Tester”,“description”:“”,“object”:{“prototype”:“data”,“parameters”:{“transformers”:[{“prototype”:“value-setter”,“parameters”:{“configurations”:[{“key”:“array”,“value”:,“mappers”:[{“prototype”:“list-fill”,“parameters”:{“start”:0,“length”:“5000”}}]}]}},{“prototype”:“list-transformer-wrapper”,“parameters”:{“transformers”:[{“prototype”:“data”,“parameters”:}]}},{“prototype”:“accessor-move”,“parameters”:{“source”:{“prototype”:“key”,“parameters”:{“root”:“array”}},“destination”:{“prototype”:“key”,“parameters”:},“stripEnclosures”:true}},{“prototype”:“list-transformer-wrapper”,“parameters”:{“transformers”:[{“prototype”:“data”,“parameters”:}]}},{“prototype”:“pattern-move”,“parameters”:{“pattern”:“*”,“replacement”:“array.$1”}},{“prototype”:“list-transformer-wrapper”,“parameters”:{“transformers”:[{“prototype”:“data”,“parameters”:}]}},{“prototype”:“key-filter”,“parameters”:{“accessor”:{“prototype”:“key”,“parameters”:}}},{“prototype”:“value-setter”,“parameters”:{“configurations”:[{“key”:“status”,“value”:“success”}]}}]}},“owner”:null,“disabled”:false}