[wpmu-trac] [WordPress MU Trac] #1175: get_dirsize() is causing file upload time outs and dashboards slowdowns

WordPress MU Trac wpmu-trac at lists.automattic.com
Fri Dec 11 23:08:01 UTC 2009


#1175: get_dirsize() is causing file upload time outs and dashboards slowdowns
----------------------------------------------------+-----------------------
 Reporter:  brianlayman                             |        Owner:  somebody
     Type:  defect                                  |       Status:  closed  
 Priority:  normal                                  |    Milestone:          
Component:  Administration                          |      Version:  2.8.2   
 Severity:  normal                                  |   Resolution:  fixed   
 Keywords:  slow,dashboard,file,upload,get_dirsize  |  
----------------------------------------------------+-----------------------

Comment(by jamescollins):

 Replying to [comment:2 donncha]:
 > In [2025] I added simple caching of the dirsize. It's invalidated when a
 file is uploaded or deleted but should still help with loading the
 dashboard.

 Donncha, it's not a big deal but wouldn't you be better off using
 transients for caching the blog size? It would save you from having to
 manually check if the cache should have expired.

 {{{
 set_transient('dirsize_cache', $dirsize, 3600);
 }}}
 instead of
 {{{
 update_option()
 }}}
 and
 {{{
 get_transient('dirsize_cache')
 }}}
 instead of
 {{{
 get_option()
 }}}

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/1175#comment:4>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list