• Was trying to figure out why I could visit any page in wp-admin except the dashboard (timed out and 500 error), finally found that on my site, the problem with this plugin is the sheer number of database results it is grabbing by default: 136,146! That is simply too much data to go and retrieve all at once, especially considering how large some of the individual rows are.

    I have added 2 lines to the wp_changes_tracker::display_log() method. I changed these lines…

    if($this->options[‘max_log_entries_to_display’]>0){
    $sql .= ‘ LIMIT ‘.$this->options[‘max_log_entries_to_display’];
    }

    … to this instead…

    if($this->options[‘max_log_entries_to_display’]>0){
    $sql .= ‘ LIMIT ‘.$this->options[‘max_log_entries_to_display’];
    } else {
    $sql .= ‘ LIMIT 10’;
    }

    This forces the default to only display the last 10 entries, instead of displaying all 136,146 entries.

    There is absolutely no reason to default to grabbing so many rows of data all at one time. Also, the table for WP-tracker had grown to 300MB, in a DB that would otherwise be only 6MB.

    http://wordpress.org/extend/plugins/wp-changes-tracker/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author pixeline

    (@pixeline)

    Sorry for not seeing this post before. Will update the plugin asap. thanks and sorry about that.

    Plugin Author pixeline

    (@pixeline)

    I reviewed the code (been a long time). On setup, that option should have been defaulted to 300. Not sure why, i’ll look after that.
    In any case, you can set it as an option in the Settings > WP Changes tracker screen, no need to hack the code.

    Plugin Author pixeline

    (@pixeline)

    Just updated the plugin: I fixed the options not being correctly defaulted and I added an option that needs to be set to “true” if you want to keep the previous value of any wordpress option changed. Will help keep the log size down.

    I’ll work on adding a “trim the log table from the Settings page” feature soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Changes Tracker] too many DB results and bloated table…’ is closed to new replies.