• Resolved Jake Jackson

    (@blue-liquid-designs)


    I have been tracking down a performance issue on one of my websites, and narrowed it down to excessive concurrent REST API GET requests to /wp-json/wp/v2/settings when editing a post/page.

    It appears that a request is made to this REST API endpoint for every Otter Block in a post. As the REST API is not cached by default, this can put significant load on the database when editing any post/page with a reasonable amount of content.

    This is present on a fresh WordPress site with only Otter Blocks installed. Create a new post/post, add a half dozen Otter Blocks patterns, and watch the Network tab of your browser dev tools while you do so.

    Here’s a video showing the issue first hand:

    This was run on WordPress 6.4.1 and PHP 7.4.33. The active theme is Twenty Twenty-Three 1.3, and only the Otter Blocks 2.5.1 plugin is enabled.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @blue-liquid-designs,

    Thank for the report. I did notice it yesterday as well while doing some changes and we will address this in an upcoming request. Thank you again for the report!

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Heu @blue-liquid-designs,

    We just released an update that should fix this issue. Let us know if it works nicely for you. Thank you again for the report!

    Thread Starter Jake Jackson

    (@blue-liquid-designs)

    Hi @hardeepasrani,

    I tested the new version, and it’s significantly better on page load. Thanks for the speedy fix!

    I did notice the same request to /wp/v2/settings/ is still made every time I select an Otter Block in the editor, or add new Otter Blocks. Can this info be cached in the store on page load, instead of being queried from the back-end every interaction?

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @blue-liquid-designs,

    Glad to know it’s better than before. I the issue you described but I don’t see it being made repeatedly anymore. It’s only made the first time you open the editor and then there are no more GET requests being made to the editor.

    If you’re still able to reproduce it, would it be possible to send a video if possible?

    Thank you!

    Thread Starter Jake Jackson

    (@blue-liquid-designs)

    Hey @hardeepasrani,

    Sure. Here’s a video showing off the new issue (no audio because my son is watching a movie in the background :D): https://vimeo.com/888500776/532f7d79c3?share=copy

    The API call looks to be coming from the themeisle-sdk: https://github.com/Codeinwp/themeisle-sdk/blob/master/assets/js/src/common/useSettings.js#L36-L47

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @blue-liquid-designs,

    Thanks for the video. I understood, it’s coming from our dependency of themeisle-sdk that we use for company-wide modules. I’ll create an issue for that and it will be fixed in the next release.

    Meanwhile, you might be having some sort of promotion coming from us in the Editor, and once that is dismissed, the useSettings from SDK should stop loading.

    Thanks for the report, again!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Performance Issue: Editing Post with Otter Blocks’ is closed to new replies.