• Resolved madriverweb

    (@madriverweb)


    Why does the update query run so frequently, every 5 or 6 seconds? I tend to leave the Simple History page open on sites with multiple admins and on which I am actively developing. In my WP Engine access logs, in one example, 1499 lines of a 3000 line log — HALF — are Simple History update queries. They show either 200 status if I am logged in or 403 status if the system has logged me out or the browser window no longer recognizes me as being logged in. In another instance, 1/6 of the entries were the Simple History updater. On SiteGround, where we can see 600 entries in our access log, almost all of the entries are Simple History.

    There are several drawbacks to this frequency, and I can’t think of a reason why the query needs to be so frequent. 1. If we are working on a site, we can refresh Simple History if we want to see more current activity. 2. The query clutters the access logs that we are offered in our portals. 3. On a platform such as WP Engine, these are likely counting toward my monthly quota of billable “visits,” although I have not inquired to verify this.

    Perhaps you can put something in the documentation about closing the Simple History window when not in use, or better yet, reduce the query frequency from once every 5 seconds to once every 5 minutes. When we are not logged in, it catches up fine when we do log in.

    /wp-json/simple-history/v1/events/has-updates?page=1&per_page=100&_fields=&dates=lastdays%3A30&since_id=xxxxxx&_locale=user

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author eskapism

    (@eskapism)

    Yeah you are correct, that is a bit to often. I will change it to something like 30 seconds in the next update.

    I’m also considering a setting to change the interval or to turn it off completely.

    I have created an issue regarding this if you want to follow the progress:

    https://github.com/bonny/WordPress-Simple-History/issues/489

    Thread Starter madriverweb

    (@madriverweb)

    Thank you! I like all three considerations you noted. I see you just updated to 30 seconds. Still seems too often. Why would 5 minutes not be frequent enough? We can refresh to see if other colleagues have made updates.

    Plugin Author eskapism

    (@eskapism)

    It has previously (before the React-rewrite in version 5) been around 10 seconds, so I don’t want to change it to much for existing users.

    Plugin Author eskapism

    (@eskapism)

    Version 5.3.0 set the timer to 30 seconds instead of 5. Maybe still not perfect for your use case but a bit better than before. I will think about some further improvements in the future.

    Thread Starter madriverweb

    (@madriverweb)

    Food for thought, at the refresh of every 5 seconds, that was 12/minute x 60/hour x 24/day x 30/month = 518,400 visits if someone leaves the page open, on one website. At 30 seconds, 1/6 of this amount. I had a $74 overage last month on WP Engine in an account which allows 100,000 billable visits. My projected billable visits for this month are 55% of what they were on the entire account last month since I shut the page, and well under my 100K limit. Again, not verified that these were billable visits, but I would expect them to be.

    Thanks again for looking into this. Your tool is invaluable.

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