Skip to:
Content

bbPress.org

Opened 7 years ago

Last modified 6 years ago

#1888 new enhancement

Possible bbPress1 converter improvement

Reported by: johnjamesjacoby 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)

#1 @johnjamesjacoby
7 years ago

  • Milestone changed from Awaiting Review to 2.2
  • Version changed from 2.0 to 2.1

#2 @netweb
7 years ago

  • Cc stephen@… added

#4 @johnjamesjacoby
7 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.

#5 @johnjamesjacoby
7 years ago

  • Milestone changed from 2.4 to 2.5

No time. Moving to 2.5.

#6 @netweb
6 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_posts in the topic import query we also would also not have post_content for the topic content or _bbp_author_ip for 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_topics then 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.

#7 @johnjamesjacoby
6 years ago

  • Milestone changed from 2.5 to Future Release

That's right. I remember that being an issue in the original iteration of the converter.

Going to put this into future release so we can reference it and iterate.

Note: See TracTickets for help on using tickets.