Support » Plugin: Connect Matomo (WP-Matomo, WP-Piwik) » 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.



Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author braekling


    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


    Thread Starter Christoph S. Ackermann


    Measured on a clean WP 4.9.* install with wp-piwik 1.0.19 – but we experienced this also on big, loaded projects.

    Plugin Author braekling


    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 5 years, 5 months ago by braekling.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Optimize performance’ is closed to new replies.