guppy3 is quite simple to use. At some point in your code, you have to write the following:
from guppy import hpy h = hpy() print(h.heap())
This gives you some output like this:
Partition of a set of 132527 objects. Total size = 8301532 bytes. Index Count % Size % Cumulative % Kind (class / dict of class) 0 35144 27 2140412 26 2140412 26 str 1 38397 29 1309020 16 3449432 42 tuple 2 530 0 739856 9 4189288 50 dict (no owner)
You can also find out from where objects are referenced and get statistics about that, but somehow the docs on that are a bit sparse.
There is a graphical browser as well, written in Tk.
For Python 2.x, use Heapy.
Related Posts:
- How can you profile a Python script?
- What is the best way to profile javascript execution?
- Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
- what does O(N) mean [duplicate]
- Fastest way to check if a value exists in a list
- How can I explicitly free memory in Python?
- Most efficient way to map function over numpy array
- What is the difference between spark.sql.shuffle.partitions and spark.default.parallelism?
- Python Sets vs Lists
- What is the difference between set and hashset in C++ STL?
- How do I profile memory usage in Python?
- Is Python faster and lighter than C++?
- When should we use Radix sort?
- Java check if boolean is null
- the asymptotic growth of n choose floor(n/2)
- Releasing memory in Python
- Steps to optimize WordPress in regard to server load and website speed?
- Slow Query for the wp_options table
- Profiling a WordPress Website for Deployment on Shared Hosting?
- What is the best caching option for WordPress multi-site on non-shared hosting?
- How can I debug the TTFB in WP?
- Localized WordPress is much slower?
- How many posts can I have in a WordPress website?
- Do multiple revisions really slow down WordPress?
- Fastest server stack configuration for WordPress?
- Cache WordPress translations
- Website is slow: advice on optimization
- Can we have a post without a slug?
- Use override_load_textdomain for cache translation and improve performance
- Combine JS and CSS for WordPress admin
- Is WordPress fast enough for a heavy traffic project?
- Does a WP site consumes memory resources when there are NO visitors?
- What is a reasonable get_num_queries() result?
- Speeding Up Bulk Post Creation – wp_insert_post & update_post_meta
- How to properly insert a stylesheet in wp_head
- Performance impact of using functions in WordPress?
- Hardcoding and WordPress Performance
- What should be disabled to run on an internal network with no access to the Internet?
- Does running WordPress on Nginx do “squat” for its performance?
- The effect of spam comments on hosting resource usage (CPU)
- Could a higher number of registered image sizes affect performance?
- What other plugins are there available to track app performance for wordpress?
- Combining multiple javascript and css files
- How many caching plugins should be used?
- Why can’t /wp-login.php be load balanced?
- Preload external PHP information
- Removing translation textdomain
- AWS (or others) vs VPS
- Do I manually minify css code in my main theme or child theme?
- Downsize CPU & DB usage in wordpress
- Do WP_debug notices explain why my site runs so slow?
- WordPress 3+ slow load times on Ubuntu 10.10
- Point static content like css and js to cookieless subdomain
- upper limit on concurrent editing?
- Page taking time in loading. Also used lazy loading but doesn’t work?
- Preload Cache for thousands of posts may be on non-production environment
- Page Loading Issue [closed]
- Suggestion to improve slow WordPress page
- Optimise page loading time faster on Genesis child theme [closed]
- Long wait times in first part of call to WordPress on Azure
- does wordpress serve static files?
- Server Hardware for WordPress [closed]
- Conditionally include files in functions.php?
- Bandwidth usage increased in WordPress 3.5
- How to test site speed?
- Remove unused CSS and JS
- Measure WordPress performance on different hosts
- Calling various CSS sheets in header a good idea?
- Using functions repeatedly instead of variables
- WordPress Site Speed (Maybe Server Issue)
- Does fixing PHP notices improves website performance?
- How do I make content only load on desktop? [duplicate]
- Slow issues with Website running WordPress on Azure
- WordPress digitalocean taking forever to load
- Favicon is loading very late
- Website slow : my fault or the host?
- Website Load Time takes forever
- What can be a solution when my wordpress is extremely slow?
- get_template_part calls amount and performance?
- Improve WordPress performance on large number of posts
- licenses, subscriptions, etc and the impact on performance
- (Xdebug Profiler) Why are there two cachegrind files generated for one page?
- Website is loading twice unnecessarily
- WordPress slow even use blank template
- What’s the best way to dequeue / remove uncooperative scripts and styles?
- Is WP-Cron / wp_schedule_event suitable for time-consuming actions?
- Using static home page and wordpress only as a blog
- High I/O load when hosting lots of wordpress sites
- How we can reduce wordpress page loading time? [closed]
- How to Aggregate, minify and compress (AMC) static and dynamic resources?
- Site too Slow to establish db connection?
- How to resolve google page speed issues for wordpress website
- To what degree can use of caching-plugins and a CDN boost WordPress performance? [closed]
- How can we remove “unused”/no long used calls when loading the homepage?
- Are networks now faster than disks?
- How can a single disk in a hardware SATA RAID-10 array bring the entire array to a screeching halt?
- High load average, low CPU usage – why?
- Very long initial loading (20sec)
- How can I optimize my website for improved speed? [closed]
- Identifying Issues in Pagespeed Insights: Server Response Time and Long Main Thread Tasks