WordPress File Monitor Plus
Feature Request :Monitor/limit RAM-usage in scanning paths in (3 posts)

  1. Devstorm
    Posted 4 years ago #

    Please impl. an option to Monitor/limit RAM-usage in scanning paths in batches. This is much more scalable. I frequently get RAM exhausted messages.
    Fatal error: Out of memory (allocated 47972352) (tried to allocate 8192 bytes) in /home/www/[...]/wp-content/plugins/wordpress-file-monitor-plus/classes/wpfmp.class.php on line 272


  2. Scott Cariss
    Plugin Author

    Posted 4 years ago #

    While a PHP script can monitor how much memory is being used I can see no way to alter my script to use less memory.

    If you are getting out of memory errors then you need to raise your memory allowance or scan less dirs.

    I've been through the entire code and re-wrote most of it in the latest versions and I cannot see where I can optimize any further.

    If you have some ideas on how I can make it more efficient or use less memory then I'm all ears.

  3. Scott Cariss
    Plugin Author

    Posted 4 years ago #

    OK have looked at a different method of scanning and here is my results

    Existing method:
    Files: 1771
    Memory Used: 834720
    Time Taken: 0.41s

    New Method:
    Files: 1771
    Memory Used: 669136
    Time Taken: 0.54

    So the new method uses less memory but took longer to run...

    I did a scan of 106070 files and this is what I got:
    Old Method: 31237920
    New Method: 20201384

    So when scanning larger amounts of data you really start to get advantages in memory usage with the new scan method.

    Only problem is where you are winning in one you are loosing in another (time).

    Also the tests I preformed were without file/dir exclusion logic. I will investigate further at a later date

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress File Monitor Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic