in reply to How to put a fat program on a (memory) weight-loss diet? [SOLVED]
Pursuing the suggestion to use Devel::Size, I find a memory-profile that ends like this (sorted in ascending order):
112475 :: Mojolicious:: 178335 :: HTML:: 186117 :: Data:: 241205 :: B:: 246604 :: DBD:: 248277 :: MojoX:: 253124 :: File:: 323990 :: DBI:: 410491 :: Template:: 491445 :: MooseX:: 505433 :: DB:: 626215 :: DateTime:: 645231 :: Mojo:: 847504 :: DBIx:: 1072300 :: Moose:: 1557717 :: SPE:: 2066977 :: Class:: 7846344 :: main::
Now, I surmise that main:: is the all-encompassing name-space, and of course SPE is the application name-space. I also know that B represents Perl itself. Everything else is, well, “what’s left.”
I pared-down the application namespace (by nearly 3 megabytes...) by eliminating Schema objects that I didn't strictly need. The application already does things like using require to demand-load a page only when it's the page that has been requested.
Does anyone have any ideas what I can do to squeeze this thing down just a little bit more?
Well-l-l... the hosting-company's ever-helpful “technical support” (sic) team offered the helpful suggestion that I could get more room by switching from PHP-4 to PHP-5... :-D ...