[wp-trac] [WordPress Trac] #19879: Better caching for get_dirsize

WordPress Trac noreply at wordpress.org
Wed Oct 14 16:09:56 UTC 2020


#19879: Better caching for get_dirsize
-------------------------------------------------+-------------------------
 Reporter:  batmoo                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  5.6
Component:  Filesystem API                       |     Version:  3.3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-dev-    |     Focuses:  multisite,
  note has-unit-tests                            |  performance
-------------------------------------------------+-------------------------

Comment (by ianmjones):

 @janthiel, thanks for getting in touch.

 WP Offload Media does use the `pre_get_space_used` filter. It queries its
 own data to get size information for files that have been offloaded and
 removed from the server, and then adds that to the total retrieved from a
 call to `get_dirsize` for the uploads basedir.​​​​

 From the sounds of things that would not be broken by this proposed
 change?

 Would it however cause performance issues?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/19879#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list