Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Proposed Cascading Categories First Draft Code - Feedback Requested

I created some code this morning to cascade discussions into parent categories. I'm hoping to get a good pull request together so take a look and code up any other ideas you might have.

Also the code base calling parent categories 'Descendants' really bothers me.

https://github.com/jasonparallel/Garden/commit/3f01266a9705e86f20e92a3a433fefe249a72459
https://github.com/jasonparallel/Garden/commit/36ff1e07df6b7c5136a7480f441b9ae876fdab6c
https://github.com/jasonparallel/Garden/commit/fcc525573b35822d6aaab462febddbf6c8ee4122
https://github.com/jasonparallel/Garden/commit/58c96f678552eb785b70368605e4853925547bc0

@tester13 @Shadowdare

Comments

  • BTW from my tests these changes do work but might not be the best way of doing things
  • Do you mean that such changes list now all discussions from subcategories also if you select category view?
  • @ffunnyman
    How about using http://johno.jsmf.net/knowhow/ngrams/index.php
    to write small automatic posts and categories generator, so we could test many aspects on largely populated forums?
    So we could define maximum number fo categories on level, nesting number, average body size for discussion and average body size for comments, plus average comments number evr discussion.

    What to you think?
    Seems useful.

  • Looks like I'm not using git correctly so it got added to my other pull request. https://github.com/vanillaforums/Garden/pull/778

    @tester13 I think that would be a no so hard plug in to build. If I start to need it, i'll build it and post it.
  • @ffunnyman
    What do you mean under "if I start to need it"?
    I personally need it, as I want to test how Vanilla works under various loads and database size.
    I need to define categories number, subcategories depth, average discussion length, average comment body size and populate fresh database from it.
    From 100.000 to 8.000.000 comments total.
    Some kind of stress testing.
  • @tester13
    I need to define categories number, subcategories depth, average discussion length, average comment body size and populate fresh database from it. From 100.000 to 8.000.000 comments total. Some kind of stress testing.
    When you have that database, please make a backup from it using the porter plugin, maybe it's a good database as a second "dummy" database :-)

    There was an error rendering this rich post.

  • I want to try dummy autegenerated one first :-)
    So, it'll be possible to test on same settings and discuss results and possible optimizations.
  • Thanks so much for this, applied the four updates listed in the first message and it's working well (http://www.throng.co.nz/forums/). Will let you know I notice any issues.
  • This changes are still not present in latest unstable branch :-(
  • @ffunnyman
    What do you mean under "if I start to need it"?
    I personally need it, as I want to test how Vanilla works under various loads and database size.
    I need to define categories number, subcategories depth, average discussion length, average comment body size and populate fresh database from it.
    From 100.000 to 8.000.000 comments total.
    Some kind of stress testing.
    Why don't you write it then?

    There was an error rendering this rich post.


  • Why don't you write it then?
    I think that this is stupid question.
    Because I don't know how to properly fill all tables (related to Users, Discussions, Categories and Comments).
  • It is not hard once you have taken a look around.
    Example to programatically create a discussion
    $discussion = Array("CategoryID"=>$catId, "Name"=>$title, "Body" => $body);
    $discussionID = $Sender->DiscussionModel->Save($discussion);
  • Generally my post was about some ready to use tool that can be set many parameters and generate new tables for testing.
    While your example seems easy, in fact it is not so easy considering all dependencies, plus inserting millions of rows into SQL table one by one is not good idea.
    Such small script is necessary to propertly understand not only scaling of engine, but also usability problem that you start having on large forum.
  • Wow.. It worked. Thanx buddy.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @tester13

    What do you mean under "if I start to need it"?

    I took it to mean that the OP doesn't feel the need to create that for themselves yet, and have other things to do with their time.

Sign In or Register to comment.