in reply to Re: Re: Re: Re: Re: Re: Re: Finding the size of a variable
in thread Finding the size of a variable

Well, try it now! :)

If the walk of \%main:: is unmanageable now, getting CVs right won't help. OTOH, if it's fast now, it won't get a whole lot slower later...

  • Comment on Re: Re: Re: Re: Re: Re: Re: Re: Finding the size of a variable

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Re: Re: Finding the size of a variable
by samtregar (Abbot) on Nov 11, 2002 at 22:33 UTC
    A few quick tests show Devel::Size::total_size(\%::main) on Bricolage taking around a half a second right after startup, on my PIII/600. As the app is used and the various memory caches start to fill up that time increases up to around 1 second per call.

    While that's certainly not bad for most uses, adding a 1 second overhead to every subroutine call would bring Bricolage (or any large Apache/mod_perl app) to a halt. Some actions require thousands of method calls, and most web browsers would time out before the response got back.

    However, you were right about one thing; it is a heck of a lot faster than Devel::Profiler!

    -sam

      Yow! That is too slow. I'll have to see what I can do to speed it up (I've a pretty good idea where things are likely to be slow) though I don't think it'll ever be fast enough if those are the numbers. Hrm. Plan B time.