I'm migrating orders from a OSCommerce using the MigrateDestinationEntityAPI::getKeySchema('commerce_order', 'commerce_order'). I'm able to map most of my fields in the constructor. the migration does not handle any line items, so it is only creating orders.
The Prepare function has the following code for attaching a billing profile:
$profiles = commerce_customer_profile_load_multiple(FALSE, array('uid' => $order->uid));
foreach ($profiles as $profile_id => $profile) {
$order->commerce_customer_billing[LANGUAGE_NONE][0]['profile_id'] = $profile_id;
}
I also have all the rules associated with order creation disabled: array ('commerce_license_activate_licenses', 'commerce_order_payment_full',
'rules_commerce_order_message_payment_entered', 'rules_set_status_to_complete_if_not_in_checkout_status',
'rules_commerce_order_message_changing_status', 'commerce_cart_unset_disabled_products', 'commerce_discount_rule_discount_multi_license_discount')
If I run my migration with drush for 1K records the rate of processing is about 2403/min. But as the size of records migrated increases the processing rate decreases rapidly. Processing 8k records drops the rate 1000/min and if I go over 20K the rate drops to about 100/min. The rate decrease seems directly proportional to the existing number of orders in the system.
According to the metrics returned by --instrument, the performance degradation is coming from destination Import and entity_save which are increasing by a factor of 12 as the number of records increase from 2K to 8K.
Has any one encountered this issue or has any advice? I need to import 120K records.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.