Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wxr-parser-large-file. #140

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

vishnugopal
Copy link

This adds a more memory-efficient WXR file parser to the WordPress importer. The existing parser loads the entire WXR file into memory whereas this one uses XMLReader to parse the file in chunks.

This parser implementation has been extensively tested at WordPress.com, and reuses the existing parsers for maximum compatibility.

To test with large XML files example:

  • wp-env start
  • wp-env run cli vi .htaccess
  • add: php_value upload_max_filesize 256M

This adds a more memory-efficient WXR file parser to the WordPress
importer. The existing parser loads the entire WXR file into memory
whereas this one uses XMLReader to parse the file in chunks.

This parser implementation has been extensively tested at WordPress.com,
and reuses the existing SimpleXML parser for maximum compatibility.
@vishnugopal vishnugopal marked this pull request as draft November 30, 2022 04:45
Copy link

@jeroenpf jeroenpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the .wp-env.json file, or was it a conscious addition?

@@ -0,0 +1,7 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably don't want to include this file :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants