Title: Optimize performance
Last modified: August 25, 2018

---

# Optimize performance

 *  [Christoph S. Ackermann](https://wordpress.org/support/users/chrigu99/)
 * (@chrigu99)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/optimize-performance/)
 * Hi there
 * Your plugin adds a bunch of SQL queries to the page.
    We are talking about nearly
   100ms and 29 queries, on a not to Matomo connected installation (clean install,
   not logged in).
 * Please optimize the performance, we detected impacts up to 800ms and a bunch 
   of queries on bigger sites.
 * Thanks!
 * Chris

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

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/optimize-performance/#post-10623509)
 * Can you provide some more details?
 * Just to be sure I had a look at my blog using the WordPress debug toolbar, and
   identified one additional query. Without more specific information I’m not able
   to reproduce this.
 *  Thread Starter [Christoph S. Ackermann](https://wordpress.org/support/users/chrigu99/)
 * (@chrigu99)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/optimize-performance/#post-10625177)
 * Ofc (directly after activation, logged out):
    [https://www.dropbox.com/s/2lg14xx8mosx9na/Screenshot%202018-08-26%2010.55.56.png?dl=0](https://www.dropbox.com/s/2lg14xx8mosx9na/Screenshot%202018-08-26%2010.55.56.png?dl=0)
   [https://www.dropbox.com/s/8qa96coufhea5v1/Screenshot%202018-08-26%2010.56.49.png?dl=0](https://www.dropbox.com/s/8qa96coufhea5v1/Screenshot%202018-08-26%2010.56.49.png?dl=0)
   [https://www.dropbox.com/s/8sonkumkpzm5c16/Screenshot%202018-08-26%2010.57.05.png?dl=0](https://www.dropbox.com/s/8sonkumkpzm5c16/Screenshot%202018-08-26%2010.57.05.png?dl=0)
 *  Thread Starter [Christoph S. Ackermann](https://wordpress.org/support/users/chrigu99/)
 * (@chrigu99)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/optimize-performance/#post-10625179)
 * Measured on a clean WP 4.9.* install with wp-piwik 1.0.19 – but we experienced
   this also on big, loaded projects.
    -  This reply was modified 7 years, 7 months ago by [Christoph S. Ackermann](https://wordpress.org/support/users/chrigu99/).
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/optimize-performance/#post-10672552)
 * I can’t reproduce this behavior, especially with a clean install. All WP-Matomo
   options are registered as autload, so they should be loaded all at once and not
   by performing multiple queries.
 * Only on mutlisites all site options are loaded one by one. This is specified 
   by WordPress itself and can’t be changed without hooking or creating separate
   query code. But you you are not talking about multisites/networks, are you?
 * Otherwise, is there any debugging plugin you are using which suppresses autload?
   E.g., to get a detailed overview of loaded options?
 * Anyway, the queries in your screenshot are taking ~0.1 milliseconds following
   the debug output… Are you sure the slowdown is caused by the queries? Can you
   get some more debug information, e.g. about methods and the time they use?
 * You can also open WP-Matomos config.php and set the log level to 2 (make sure
   the log directory is writable):
 * `define ( 'WP_PIWIK_ACTIVATE_LOGGER', 2 );`
 * The log file contains information on what WP-Matomo is doing. The slowest part
   of WP-Matomo are typically HTTP connections to the Matomo server, but if you 
   say it’s not configured yet, there also can’t be any requests, of course. Maybe
   the log gives us a hint on what’s happening here.
    -  This reply was modified 7 years, 6 months ago by [braekling](https://wordpress.org/support/users/braekling/).

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

The topic ‘Optimize performance’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3467966)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [performance](https://wordpress.org/support/topic-tag/performance/)
 * [piwik](https://wordpress.org/support/topic-tag/piwik/)
 * [queries](https://wordpress.org/support/topic-tag/queries/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [speed](https://wordpress.org/support/topic-tag/speed/)

 * 4 replies
 * 2 participants
 * Last reply from: [braekling](https://wordpress.org/support/users/braekling/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/optimize-performance/#post-10672552)
 * Status: not resolved