High memory usage
-
In case there are a lot of posts (in our case ~15.000) PHP runs out of memory (in our case 1GB) when trying to retrieve all the posts to list in a dropdown.
Even before this hard crash happened, the “add slide” page was loading awfully slow.The problem is in
class-foyer-admin-slide-format-post.php
$args = array( 'post_type' => 'post', 'posts_per_page' => -1, ); $posts = get_posts( $args );
I did a quick fix by limiting them to 50.
This probably isn’t meant to run on a news site, but there should be a better solution, to choose a post for a slide, like something AJAX based.
- The topic ‘High memory usage’ is closed to new replies.