[wpmu-trac] [WordPress MU Trac] #1053: WPMU Dashboard high memory usage
WordPress MU Trac
wpmu-trac at lists.automattic.com
Fri Jul 17 02:46:14 UTC 2009
#1053: WPMU Dashboard high memory usage
--------------------------+-------------------------------------------------
Reporter: jasonbenesch | Owner: somebody
Type: enhancement | Status: reopened
Priority: normal | Milestone: 2.8.1a
Component: Optimisation | Version: 2.8.1
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+-------------------------------------------------
Changes (by jamescollins):
* keywords: => dev-feedback
* summary: Memory Hog => WPMU Dashboard high memory usage
* component: Administration => Optimisation
* milestone: => 2.8.1a
Comment:
In [1887] donncha changed the default memory limit to 64MB.
You are right though, when loading the my blogs page, get_blogs_of_user()
is called 3 times.
On every other dashboard page load, get_blogs_of_user() is called only
once.
Out of interest, how many blogs / users do you have on your system?
The get_blogs_of_user() will call get_blog_details() for each of the blogs
that the user is a "member" of as well.
Ideally if we only had to call get_blogs_of_user() once on every dashboard
page load (including when visiting the my blogs page), then that would
probably help with performance.
Donncha, any suggestions on the best way to do this?
I have just profiled the loading of the main dashboard page, and in the
wp-admin/includes/mu.php file, the mu_media_buttons() function seems to
take the longest out of all the functions in the file (0.000140sec).
In wp-includes/wpmu-functions.php, the get_dirsize() function takes the
longest (0.001417sec), and is called 9 times. In my test, this function
was recursively called which resulted in the following directories having
their size calculated:
{{{
/wp-content/blogs.dir/1/files/
/wp-content/blogs.dir/1/files/2009
/wp-content/blogs.dir/1/files/2009/01
/wp-content/blogs.dir/1/files/2009/02
/wp-content/blogs.dir/1/files/2009/03
/wp-content/blogs.dir/1/files/2009/04
/wp-content/blogs.dir/1/files/2009/05
/wp-content/blogs.dir/1/files/2009/06
/wp-content/blogs.dir/1/files/2009/07
}}}
Perhaps there is some way that this function can be optimized.
get_blogs_of_user() is the next slowest function (0.001132sec) but is only
called once on most dashboard page loads.
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/1053#comment:12>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list