Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7730187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:09:39+00:00 2026-06-01T06:09:39+00:00

i have a script that does a lot of processing on some rows from

  • 0

i have a script that does a lot of processing on some rows from the DB(lots of them). The script is using lots of objects, and some internal caching mechanisms.

At some point, i’m freeing all used cache, to avoid eating all the available RAM just for the cached items, but the used memory isn’t decreasing.

I’ve used memory_get_usage(true) to determine how much RAM the script is taking, but i have no ideea how to detect what objects are still in RAM and still eating up memory.

The simple solution is to go back through all objects, and make sure no variables are still alive and pointing at them, and that all internal caches are actually free’d and test and test and test again, but I’m looking for a tool or a function call that would tell me that “variable Y in class Z has 90% of your RAM”, without having to know and mess with all the internals of the objects that i use in this script.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:09:40+00:00Added an answer on June 1, 2026 at 6:09 am

    Why don’t you profile your script?

    Use xdebug with the profiler turned on and investigate what is going on at your cachegrind file.

    See more here: http://www.xdebug.org/docs/profiler

    Update: You could get more memory related information by using xdebug.show_mem_delta parameter in conjunction with xdebug.trace_format both set to 1 to get memory usage in a simple html.

    Check this http://xdebug.org/docs/execution_trace and this http://derickrethans.nl/xdebug-and-tracing-memory-usage.html to get some ideas.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple script that does some search and replace. This is basically
I have a TSQL script that does a lot of database structure adjustments but
Suppose I have a script that does a lot of stuff, and doesn't work
I have a script that I run which does a lot of tasks and
I have a CGI script that does a lot things. I'm trying to keep
I have a script that does a lot of legwork nightly. It uses a
I have a batch script I run before our performance tests that does some
Currently we have a script that does maven build + tomcat deploy. Deploying to
I have a bash script that does ssh to a remote machine and executes
I have a PHP script that does the following: Uses file_get_contents() to get content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.