Python wagtail guppy subpackage heapy

Python wagtail guppy subpackage heapy

 In the previous article we have discuss about guppy and what are the different type of subpackage inside guppy .If you have not gone through it you see through this link guppy Introduction . In this article we will discuss about one of the subpackage that is heapy.

Heapy Introduction

The aim of Heapy is to support debugging and optimization regarding memory related issues in Python programs.

Such issues can make a program use too much memory, making it slow by itself as well as slowing down an entire server, or it may fail to run at all in a limited memory device such as a mobile phone.

The primary motivation for Heapy is that there has been a lack of support for the programmer to get information about the memory usage in Python programs.

Heapy provide the following feature:-

      1.Data gathering

  • Finds reachable and/or unreachable objects in the object heap, and collects them into special C-implemented 'nodesets'. Can get data about the objects such as their sizes and how they refer to each other.
  • Uses a C library that can get data about non-standard types from extension modules, given a function table.
  • Optionally uses multiple Python interpreters in the same process, so one can monitor the other transparently.

     2.Data processing

  • Algebraic set operations, for example the set difference can be used to extract the objects allocated after a reference point in time.
  • Various classifications of object sets, and different classifiers can be combined.
  • Shortest paths to a set of objects from other objects, which can be used to find out why the objects are retained in memory.
    3.Portability aspects

  • Requires Tk if the graphical browser is to be used.
  • Can not be used with Jython or other non-C Python versions.

    4.System aspects

  • A general 'glue' model provides a session context that imports modules and creates objects automatically when accessed. The glue model is not Heapy specific but is used throughout Guppy and could be used by other packages as well.
  • The glue model makes it practical to have everything in Guppy being dynamically allocated in a session context, so there is no need for any global module-level variables. The modules themself are stored as usual in sys.modules but they are not modified.

Heapy has been used during development of itself and of the other parts of Guppy. It has been used to tell how much memory the parts of compound objects use, to see what could be worthwhile to optimize. It was used to find a memory leak in the Heapy profile browser, and to find out the cause, which as far as I can tell was due to a bug in a library routine.


Name Views Likes
C++ Exception Handling-|| 85 3
C++ Exception Handling 116 3
C++ File Handling EOF 92 5
C++ File Handling Error Handling During file Operation 1135 5
C++ File Handling seekp() Function 105 5
C++ File Handling seekg() Function 105 6
C++ File Handling tellg() Function 126 5
C++ File Handling tellp() Function 133 5
C++ File Handling close() Function 78 5
C++ File Handling:: open() 106 5
C++ File Handling Introduction 131 5
C++ Container Library:: std ::array-II 101 4
Top Django Interview Questions and Answers You Need to Know 302 6
C++ Container Library::std::array 96 6
C++ Container Library Introduction 103 5
Essential Engineering Skills for Your Resume 127 5
Mistakes To Avoid During Technical Interview 133 5
Mistakes You Must Avoid During Work From Home 178 6
Seven Common Mistakes that Beginners Should Avoid While Learning to Code 108 6
Simple Linear Regression 96 6
Python wagtailmenus 122 6
Python wagtail application 119 6
Python guppy GSL 136 5
Python wagtail guppy subpackage heapy 174 6
Python guppy Introduction 215 6
Python wagtail Structural Block 257 6
Python wagtail Integrating into Django Project 370 6
Python wagtail testing 280 7
Python wagtail Basic Block 349 7
Python wagtail image tag 216 7
Python wagtail Templates 179 6
Python wagtail Backends 206 6
Python wagtail Indexing 189 6
Python wagtail Search 173 7
Python wagtail Snippets 192 6
Python wagtail Writing your own page models 165 9
Python wagtail model class PageRevision 196 10
Python wagtail model class Site 198 9
Python wagtail wagtail core model 218 9
Python wagtail page models 189 10
Python wagtail 166 11