• I work for a hosting company and one of our customers uses this plugin. We’ve noticed it causes high database lock contention, which is because it sends these database commands on every page view:

    ALTER TABLE wp_church_tithe_wp_transactions CHANGE COLUMN charged_amount charged_amount int NOT NULL
    ALTER TABLE wp_church_tithe_wp_transactions CHANGE COLUMN gateway_fee_hc gateway_fee_hc int NOT NULL
    ALTER TABLE wp_church_tithe_wp_transactions CHANGE COLUMN earnings_hc earnings_hc int NOT NULL
    ALTER TABLE wp_church_tithe_wp_arrangements CHANGE COLUMN initial_amount initial_amount int NOT NULL
    ALTER TABLE wp_church_tithe_wp_arrangements CHANGE COLUMN renewal_amount renewal_amount int NOT NULL

    This makes it pretty slow (ALTER TABLE commands are not efficient). This appears to be because it runs this whenever the object is instantiated:

    church_tithe_wp()->transactions_db->create_table();
    church_tithe_wp()->arrangements_db->create_table()

    Things like that should only be done when the plugin is activated, not on every page view. It would be great if you could fix that.

  • You must be logged in to reply to this topic.