• Resolved hephoto

    (@hephoto)


    Hi All,

    Thanks for that great plugin.

    After installing and using this great plugin, my web site take a while to open, like more than 2 minutes.

    This is maybe due that I use it “intensively” in the the main page and on “category pages” like this:
    https://hephoto.ch/category/galerie/

    So, is there a way to optimize, to speed up this ?

    Before using it, I was using the WP-PostViews, where it was fast, but for a strange reason I lost all the counts … So your plugin is the alternative with All Time Values ??

    Best regardsHep

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    The plugin relies on Jetpack’s Stats feature, and the data is cached by the Jetpack plugin for 5 minutes at a time for each post. Jetpack doesn’t offer a way to cache things for a longer period, mostly because if you were to cache things for a longer period, then the number of views may not always be up to date when one visits the page.

    One way to speed this up would be to fetch the number of views via AJAX after the page has loaded, instead of fetching the data as the page loads. That’s not something my plugin handles out of the box, so you would have to build this on your own I’m afraid.

    I hope this clarifies things a bit.

    Thread Starter hephoto

    (@hephoto)

    Thanks for the information.

    I do not know what to do, as I have no idea on how to use Ajax ??

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    You could try something like this:
    https://gist.github.com/jeherve/eff6a8378fef77cce6c32e46de1c8b7f

    I threw this together without testing on your site, but you can give it a try by disabling the existing Post views plugin and adding this one instead, via Plugins > Add New > Upload:
    https://gist.github.com/jeherve/eff6a8378fef77cce6c32e46de1c8b7f/archive/f574093975794ce946c413b956d6fd1f8a298d39.zip

    If that doesn’t work, I would recommend looking for a WordPress professional who could build this for you. You can do so here:
    https://jetpack.pro/
    https://jobs.wordpress.net/

    Note that in any case, querying for all post views will still take some time to complete. To avoid such issues, the best would probably be to not display the post views on your list of posts, but instead only show them when viewing each post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loading page / site take a while’ is closed to new replies.