Skip to:
Content
Pages
Categories
Search
Top
Bottom

Trashing/Deleting Topics


  • craigcotner
    Participant

    @craigcotner

    With a fairly large board, I m finding that deleting old topics to be painfully slow. When topics have 500 replies, it is not TOO bad. Sending to the trash takes about 3 minutes and emptying the trash take about another 5 minutes. Not great, but not too bad.

    But when topics have 1000-2000 replies, it often times out. So it moves some of it to the trash. I select it again and the big topics eventually get to the trash. Then comes the empty trash part. It just takes forever. Usually times out. I have to empty the trash several times to get those large topics finally gone. The process for those large threads takes 30 minutes or so.

    Am I doing something wrong here? Should I be using some other type of process to get rid of old topics?

    How are the rest of you handling this?

Viewing 11 replies - 1 through 11 (of 11 total)

  • Robin W
    Moderator

    @robin-w

    in all honesty, I’m no sure many people have topics with 2000 replies and indeed ones that they then want to trash πŸ™‚

    As it happens, I’m looking at how topics get trashed at the moment – add a new reply to this topic if I haven’t come back in a week


    craigcotner
    Participant

    @craigcotner

    Well… this board and the board that supports WordPress are straight up Q&A boards. People asking questions like I am.

    But my board is a discussion board/forum. So you have topics that get hundreds, even thousands of replies. So I was just wondering how that is handled. Nice to know that this is something you just happen to be looking at! So you go do your thing!


    Robin W
    Moderator

    @robin-w

    Not suggesting what you are doing is wrong, just that I suspect it is unusual πŸ™‚


    iQfy Media
    Participant

    @iqfy

    I am experiencing the same issue, but my topics only have about 90-300 replies each. Bulk deletion is a complete no go: after timing out and waiting 5+ mins, at best I’ll see one deleted thread from the 20 selected.


    craigcotner
    Participant

    @craigcotner

    I have had to break huge topics down to 300-500 replies. Then trash and empty the trash each of those smaller topics one by one. There is no such thing as bulk deletion for me. πŸ™‚


    Jimmyt53
    Participant

    @jimmyt53

    I’d also be very interested in this. My forum has been running for 12 years and many of the issues it has covered have been ovetaken by changes in the law. Basically I want to take out five years of topics and replies but I don’t want to have to go through month by month. Any assistance with mass pruning would be terrific as I’m reaching file capacity with my server.


    Robin W
    Moderator

    @robin-w

    All – let me just clarify that I’m just a guy sat in his kitchen who helps out here, I am not a bbpress author !!


    @craigcotner
    & @iqfy- trashing topics or replies calls a standard WordPress function which checks for comments and media on each post before trashing. This involves a database lookup to check whether anything in those tables needs deleting and it is this that seems to be taking the time and making you both time out. Topics and replies don’t have comments or media that is attached in that way, so these steps are not needed.

    Now trashing a reply is fairly easy, replies don’t hold any data that needs referencing elsewhere that we need to worry about.

    But Topics have engagements and subscriptions to be gone through.

    so if I wrote some code to allow you to delete a numbered topic, this could use a quicker method to permanently delete all the replies, and then use the proper function to delete the topic.

    And as long as the topic or reply it is not latest activity, then we can maybe skip the step that needs to recalculate what the lastest activity now needs to be.

    That should prevent timeouts I hope.

    SO 2 things here

    1. any topic/reply being got rid of should not be the ‘latest activity’ in the forum – but I’m guessing if the topic is still getting replies and therefore ‘hot’ then you would not be deleting it
    2. this would be deleting it a numbered topic at a time, so you would look up the topic and then in the dashboard there would be an option to enter that topic number to trash it.

    Does that sound as if it would work for you?


    @jimmyt53
    – not sure how easily I’d be able to fix that, but I’ll think about it as I progress. so

    1. how would you want to pick topics for deletion – by ‘older than’ presumably? and
    2. just from one forum or across all forums?
    3. again could not be a topic or reply where it is latest activity

    Feedback before I start code something that doesn’t help would be great πŸ™‚

    and from all – are we talking about permanently deleting – ie reduce database size, or just trashing – ie stopping people seeing, but retaining the ability to restore later?


    craigcotner
    Participant

    @craigcotner

    I totally get that you are not an author… Your bbp Style Pack is the first plugin I added to my install.

    My site is a gathering of sports fans. So we have a lot of threads that get very big. I do a few things since I just moved over from a phpBB board. I first took some topics that were several years old and had thousands of replies and first split them up. Only keeping the newer posts. Then took the older thread and put it in a holding area. Then I break them down in to smaller pieces so I can delete them. This is the part that is taking forever to do.

    This is sort of a first time clean up of the old phpBB board after I imported it to bbPress. So once I get through that, I can see a time where I am not deleting old threads as much.

    But for the long haul, I can see where I would regularly close threads and want to delete them. So I like how I can just put topics in a “holding” forum that only I can see. Then if you have a way through your plugin that I can enter a topic ID for deletion would work perfect!


    Robin W
    Moderator

    @robin-w

    thanks for that – it all helps me decide what route to go.

    So wordpress has several states, these include draft, publish and trash. You can then permanently delete – this gets rid of them from the database, which makes it faster for lookups. Given the power of servers nowadays, many sites will have no problem with a significant database, so permanently deleting may not speed up your site, but is cleaner if you are sure you never want them back.

    However your post does give a further alternate that I was not imtending, but might be your solution. If you create a ‘hidden’ forum, then this is only visible to moderators and keymasters. So instead of using a plugin that I write, you could simply move topics into that hidden forum

    so

    dashboard>forums>add forum> call it what you like but in forum attributes (top right) and set visibility to hidden

    then for each topic

    dashboard>topics>all topics>edit topic>topic attributes (top right) and just change the forum it belongs to to the new hidden one.


    Jimmyt53
    Participant

    @jimmyt53

    Hi Robin and thanks for picking up on this. To answer your questions:

    1. how would you want to pick topics for deletion – by β€˜older than’ presumably?

    Yes. A the moment I have to go month by month and wait for WP to do its thing

    2. just from one forum or across all forums?

    All forums.

    3. again could not be a topic or reply where it is latest activity

    Not an issue as these topics and replies would be at least seven years old

    4. Are we talking about permanently deleting – ie reduce database size, or just trashing – ie stopping people seeing, but retaining the ability to restore later?

    Permanent deletion required as my ISP is telling me that I’m nearing my limit on the number of files (but not the capacity in terms of memory usage) and this would allow me to get rid of material that is no longer relevant.


    Robin W
    Moderator

    @robin-w

    @jimmyt53 – thanks

    I’ll try and work up some code in the next couple of days

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar