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
- How to measure elapsed time in Python?
- 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?
- Is there a way to delete created variables, functions, etc from the memory of the interpreter?
- Measure the time it takes to execute a t-sql query
- Replace values in list using 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?
- How do I determine the size of an object 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)
- How to parallelize downloads across hostnames on WordPress?
- How to parallelize downloads across hostnames on WordPress?
- Get difference between two lists
- Releasing memory in Python
- Steps to optimize WordPress in regard to server load and website speed?
- How well does WordPress scale?
- What are the best practices for using a caching plugin on a shared host?
- 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?
- WordPress usermeta scaling for thousands of users
- How can I debug the TTFB in WP?
- What’s the difference between wp_insert_user() and wp_create_user()
- How to fix wordpress slow first time load (Local Server)?
- What’s the ideal way to profile WordPress memory usage?
- WordPress SLOW, tried everything!
- Localized WordPress is much slower?
- W3 Leverage browser caching not working for google pagespeed [closed]
- How many posts can I have in a WordPress website?
- WordPress so slow to load on MAMP
- Do multiple revisions really slow down WordPress?
- get_adjacent_post alternative on a very large db
- Fastest server stack configuration for WordPress?
- Cache WordPress translations
- Website is slow: advice on optimization
- Can we have a post without a slug?
- Refresh external feeds only in cron?
- Use override_load_textdomain for cache translation and improve performance
- What is the proper use of https in a modern E-Commerce environment?
- Combine JS and CSS for WordPress admin
- Any reason why wp_cache_set not to work?
- Will removing revisions positively impact database performance?
- Is WordPress fast enough for a heavy traffic project?
- What are best practices for configuring a server for WordPress sites?
- Does a WP site consumes memory resources when there are NO visitors?
- Extremely slow WordPress website with 6000 posts
- In terms of performance – Is unmanaged VPS better than a managed one – for WP sites?
- Utilize WordPress Authentication Only
- How can WordPress be made more memory efficient?
- WordPress tries to load “next page” after done loading current page
- Get Y random authors’ ID/Object with more than X number of posts
- 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?
- Localization / textdomain is slow and chaotic
- Disable Outbound Web Requests
- WordPress performance issue. Can I debug it?
- 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)
- How much will mounting wp-content on a separate NFS server impact performance?
- 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?
- Image Preloading
- WordPress Meta description – is it better to use manual configuration?
- Preload external PHP information
- Performance impact of using global $post
- Removing translation textdomain
- WordPress site is sloooow, but admin is fast….any ideas?
- WordPress Scalability – One Instance or Several?
- What Is The Best Method/Tool To Investigate WordPress Internal Performance?
- AWS (or others) vs VPS
- Do I manually minify css code in my main theme or child theme?
- Is post_class(); going to slow WordPress page speed
- Downsize CPU & DB usage in wordpress
- Do WP_debug notices explain why my site runs so slow?
- cross-host benchmarking with wordpress
- Performance problem with first load
- WordPress 3+ slow load times on Ubuntu 10.10
- WordPress Caching On Demand
- Is there a real benefit in using wordpress optimized hosting?
- What is better to use, user meta, custom taxonomies or new database structure? [closed]
- How to disable Vary cache header on W3Total Cache plugin [closed]
- Point static content like css and js to cookieless subdomain
- upper limit on concurrent editing?