Support » Plugin: WP-Matomo Integration (WP-Piwik) » Matomo plugin creates a lot of queries

  • Hi there

    Your plugin is creating a lot of queries (in fact: 29 queries per site request) due to inefficient options load.
    This doesn’t matter for the usual pluginstuffed WordPress website, but came into the way on superoptimized, high performance websites.

    So: Either get your options into autoload, set your option as serialized array in one field or create a decent caching mechanism with transients.

    Thanks a lot,
    Christoph

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Christoph S. Ackermann

    (@chrigu99)

    @braekling Can u take a look into my request?

    Plugin Author braekling

    (@braekling)

    I already answered this two years ago:

    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.

    See https://wordpress.org/support/topic/optimize-performance/#post-10672552

    Maybe you can check this again and answer my questions so we can figure out why autoload does not work in your case.

    Thread Starter Christoph S. Ackermann

    (@chrigu99)

    @braekling Uh I forgot about this issue, sorry.
    I will look into it the next days.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.