-
Notifications
You must be signed in to change notification settings - Fork 953
Closed
Yoast/developer
#245Closed
Copy link
Labels
Description
- I've read and understood the contribution guidelines.
- I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened.
- Saving posts with a lot of links and images takes ages to save.
- The other issue is that it also results in timing out the wp autosave ajax request and triggering "connection lost" notice, luckly it doesn't prevent post from being save because.
Looks like the culprit is Indexable_Link_Builder->build() added to wp_insert_post hook in Indexable_Post_Watcher
I've tested it on blank wp install with only Yoast and classic editor installed:
First request is with Yoast enabled and the second one is with Yoast disabled, both requests are wp_autosave:

Here is sample post:
https://gist.github.com/maciejmackowiak/277427859825d232fe2a37a21d15d7cf
Please describe what you expected to happen and why.
- Optimize the
Indexable_Link_Builderor if it is not possible to optimize run it in cron job. - Do not run
Indexable_Link_Builderon autosaving posts.
How can we reproduce this behavior?
- Create a post with a lot of links and images - https://gist.github.com/maciejmackowiak/277427859825d232fe2a37a21d15d7cf
- Try to save/autosave the post.
Technical info
- If relevant, which editor is affected (or editors):
- Classic Editor
- Gutenberg
- Classic Editor plugin
- Which browser is affected (or browsers):
- Chrome
- Firefox
- Safari
- Other
Used versions
- WordPress version:
- Yoast SEO version:
- Gutenberg plugin version:
- Classic Editor plugin version:
- Relevant plugins in case of a bug:
- Tested with theme:
Reactions are currently unavailable