• Hi,

    i like DynamicWidgets because it helps me a lot of times.

    Currently i tried to optimize performance of client site and it looks like dynamic widgets has performance issue with database query.

    Every time is DynamicWidget initialized it’s checks for database table if exists.
    I think this is not neccessary bottle neck, because this process should be moved into installation hook or enabling plugin hook.

    This piece of code:
    classes/dynwid_class.php#59

    $query = “SHOW TABLES LIKE ‘” . $this->dbtable . “‘”;
    $result = $this->wpdb->get_var($query);

    $this->enabled = ( is_null($result) ) ? FALSE : TRUE;

    Should be only checked on install / enabling. Not every page load. Big performance issue then.
    What do you think?

Viewing 1 replies (of 1 total)
  • Plugin Contributor Qurl

    (@qurl)

    I don’t agree. It should be checked every time. This makes sure Dynamic Widgets does not run into a fatal error when the table got (suddenly) missing breaking a complete website.

Viewing 1 replies (of 1 total)
  • The topic ‘Checking table every time is performance issue’ is closed to new replies.