Skip to content

Conversation

@westonruter
Copy link

@rmccue
Copy link
Member

rmccue commented Nov 18, 2015

Looks good! This does cause extra sets on the $this->exists array though, any thoughts on the performance of that with lots of posts?

@westonruter
Copy link
Author

I'm not familiar enough with the new codebase to speak to performance, but this patch has been applied to the existing WordPress Importer plugin on WordPress.com and we're using it successfully there.

@rmccue
Copy link
Member

rmccue commented Nov 18, 2015

Specifically, if I call post_exists twice with the same data, the second one will set the same key on the array again. The array we're talking about is potentially massive, as it's every GUID => ID on the site, so writing unnecessarily to that may cause terrible performance.

(In the old importer, the array is only the posts imported so far.)

@rmccue
Copy link
Member

rmccue commented Nov 18, 2015

Also, in keeping with the new naming scheme, this should be wxr_importer.post_exists instead.

@danielbachhuber
Copy link

this should be wxr_importer.post_exists instead.

Why are you using . in your filter names?

@westonruter
Copy link
Author

The wp_import_existing_post name is specifically for compatibility with the existing WordPress Importer plugin form which this patch is supposed to be committed.

@rmccue
Copy link
Member

rmccue commented Nov 19, 2015

Why are you using . in your filter names?

Because it looks nice. :)

The wp_import_existing_post name is specifically for compatibility with the existing WordPress Importer plugin form which this patch is supposed to be committed.

It's not actually merged into the original Importer though, right? For new filters, I'd like to stick to the new style prefixes.

@westonruter
Copy link
Author

@swissspidy
Copy link
Contributor

Ready to go in my opinion.

@swissspidy
Copy link
Contributor

Worth noting that it has been added to the original importer for version 0.6.2 which was released, but then the release was canceled again. So we could probably use the new style prefix for it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants