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

WordPress Trac noreply at wordpress.org
Mon Sep 21 06:52:11 UTC 2020


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

Comment (by janthiel):

 Just wanted to push the importance of this feature.

 We already replaced the default WordPress PHP calculation with OS native
 features ("du" on Linux) which reduced the amount of time massively last
 year. Sadly now we moved our uploads to NFS (aka "a slow filesystem") and
 the upload folder grew even more over time. So we are back to quota
 calculation times of >30s.
 As some sites see regular uploads which resets the transient frequently
 throughout the day, the impact of this is massive to the WP-Admin backend,
 as well as to REST API calls to the /media/ endpoint.
 Calculating this on a per month base and only on a "as needed" base is a
 perfect way to address this issue permanently! Then the calculation times
 should go down instantly independet of filesystem and way to measure the
 space used (OS tools or default PHP).

 So this is a definite +1 for approaching this soon.

 Anything we can do to support?

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


More information about the wp-trac mailing list