The MU forums have moved to WordPress.org

Login wp-admin page is so slow when I have images in the /files folder (4 posts)

  1. RiniBoo
    Member
    Posted 15 years ago #

    I am running Apache 2.2 + latest PHP on Windows, and I have been running Wordpress for years. Recently I updated to Wordpress MU latest version.

    After I imported (using XML) my old blog to Wordpress MU, everything was fine.

    However, when I manualy copied all my IMAGES (around 165 MB) to
    \blog\wp-content\blogs.dir\3\files\

    Whenver I login, it took 30-40 seconds to load the page.

    I noticed that PHP was trying to calculate the amount of space that I have used, I think it goes through all YEAR/MONTH folders that took so much time. This is the dash board display after I logged in:

    Total space available: 2000MB
    Upload space used: 164.67MB ( 8%)

    Is there anyway to disable this "space calculating" feature to speed up my login?

    When I deleted all those images from the folder, it took less than 1 second to login. Is this a bug? or you guys having the same issue?

    Help..

  2. bechster
    Member
    Posted 15 years ago #

    I am having the same or a similar problem.

    However the problem only appears when loading wp-admin for one of my blogs. It takes ages to load. The front end loads fine, though. Wp-admin for my 2 other blogs seem fine too.

    Don't know if this has anything to do with uploads or images, though.

    Any help is much appreciated.

  3. rfrovarp
    Member
    Posted 15 years ago #

    It is possibly get_dirsize in wp-includes/wpmu-functions.php. It recursively calculates the size of a blogs files directory. To do this, it examines every file to find its size. No doubt with many files and many directories, this process would take quite a while. I don't know that there is a better way of doing this. Caching the result and invalidating it upon an upload or delete would be a good strategy. I've changed mine to use the built in Linux command of du, which would be cached by the OS. However, I did this to add some functionality I need and don't have any performance testing, as my service is quite new.

  4. bechster
    Member
    Posted 15 years ago #

    I only have a few very small attachments, mostly images, for posts in each blog but anyway each page in the admin interface takes around 90 seconds to load. My main blog doesn't seem to be affected, though.

    There are no errors to be found in the apache server error log, obviously because it isn't a server error, so there is not very much to work with.

    Is it possible to setup something on the server to get around this problem? Caching og something? In that case what can be done and how do I do it?

About this Topic

  • Started 15 years ago by RiniBoo
  • Latest reply from bechster