All post data is loaded into memory before the batch process is launched. On large imports (ie, 1000+ posts), this can trigger a PHP memory exhaustion error.

Instead of loading the all XML data into memory, we should use stream-based XML processing to go through the WXR data. XMLReader, available in PHP 5.1 (and PHP 5.0 via PECL module), is a good candidate.

Comments

lavamind’s picture

Status: Active » Fixed

Done and committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.