Opened 14 years ago
Last modified 12 years ago
#1888 new enhancement
Possible bbPress1 converter improvement
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | 2.1 |
| Component: | API - Importers | Keywords: | needs-patch |
| Cc: | stephen@… |
Description
I think we can speed up the bbPress1 importer pretty dramatically. The topic query is really slow because it joins the topics and posts tables. If we loop through posts and manually checked the post position for 0 or 1 as a topic, we can differentiate between topics and replies converter-side instead of query-side.
Change History (7)
#4
@
13 years ago
- Milestone changed from 2.3 to 2.4
The recent conversion of BuddyPress.org went pretty smoothly, and much faster than bbPress.org. I'm comfortable punting this to 2.4 to focus on other issues in 2.3.
#6
@
12 years ago
We can't use post_position to speed up the topics query as post_position is a bb_posts table field so to use it we would still have to join the bb_posts table to the topics query.
Current bbPress1.php topic import query :
SELECT topics.topic_id AS topic_id, topics.topic_posts AS topic_posts, topics.forum_id AS forum_id, topics.topic_poster AS topic_poster, topics.topic_title AS topic_title, topics.topic_slug AS topic_slug, posts.post_text AS post_text, topics.topic_status AS topic_status, posts.poster_ip AS poster_ip, topics.topic_start_time AS topic_start_time, topics.topic_time AS topic_time FROM bb_topics AS topics INNER JOIN bb_posts AS posts USING (topic_id) WHERE posts.post_position IN (0,1)
- If we don't join
bb_postsin the topic import query we also would also not havepost_contentfor the topic content or_bbp_author_ipfor the topic authors IP address.
Current bbPress1.php reply import query:
SELECT posts.post_id AS post_id, posts.topic_id AS topic_id, posts.forum_id AS forum_id, topics.topic_title AS topic_title, posts.poster_ip AS poster_ip, posts.poster_id AS poster_id, posts.post_status AS post_status, posts.post_text AS post_text, posts.post_position AS post_position, posts.post_time AS post_time FROM bb_posts AS posts INNER JOIN bb_topics AS topics USING (topic_id) WHERE posts.post_position NOT IN (0,1)
- For the reply import query if we don't join
bb_topicsthen all imported replies would be titled(No Title)in the wp-admin reply dashboard.
A bbPress 'tool' could be added to repair the 'reply title' after import but without major changes to bbPress' converter.php there is no way to import the topics post_content without joining bb_posts to the topic import query.
Related: #1817