[MTOS-dev] Memory Utilization Brainstorm

Timothy Appnel tim at appnel.com
Sat Dec 29 11:25:55 PST 2007


I added this line to the start of MT.pm:

  use Devel::Leak::Object qw{ GLOBAL_bless };

When I run mt.cgi I get this report appended to the page when I hit
load the edit entry screen:

Tracked objects by class:
CGI                                      1
DBI                                      1
DBI::db                                  2
DBI::dr                                  2
DBI::st                                  74
DBI::var                                 5
Data::ObjectDriver::Driver::Cache::RAM   1
Encode::Internal                         1
Encode::utf8                             1
JSON::Converter                          1
MT::App::CMS                             1
MT::ArchiveType                          16
MT::Author                               1
MT::Blog                                 1
MT::Builder                              1
MT::Callback                             125
MT::Comment                              1
MT::Component                            1
MT::ConfigMgr                            1
MT::Core                                 1
MT::L10N::en_us                          1
MT::Memcached                            1
MT::ObjectDriver::Driver::DBI            1
MT::Permission                           1
MT::Plugin                               2
MT::Plugin::Cloner                       1
MT::Plugin::FeedsLite                    1
MT::Plugin::MultiBlog                    1
MT::Plugin::SpamLookup                   1
MT::Plugin::SpamLookup::KeywordFilter    1
MT::Plugin::SpamLookup::Link             1
MT::Plugin::StyleCatcher                 1
MT::Plugin::Textile                      1
MT::Plugin::WXRImporter                  1
MT::Plugin::WidgetManager                1
MT::PluginSettings                       5
MT::Serialize                            2
MT::Session                              1
MT::Template                             14
MT::Template::Context                    14
MT::Template::Node                       1823
MT::Template::Tokens                     306
MT::WeblogPublisher                      1
utf8                                     1

According to the docs "Any objects thus tracked are remembered until
DESTROYed; details of any objects left are printed out to stderr at
END-time." So these are all the objects created in one request that
are still left in memory after one request is processed, correct?

<tim/>


More information about the MTOS-dev mailing list