On Mon, Jun 29, 2009 at 12:29:54PM +0200, Rafael Garcia-Suarez wrote: > 2009/6/29 Alex Efros <powerman@powerman.name>: > > Only I can do is try to explain again: error-reporting code like Carp MUST NOT > > request additional resources - because if some error happens it's very > > likely 'not enough resources' error and trying to get more resources just > > to show error message just feels wrong. > > > > I think correct solution will be to load Carp::Heavy together with Carp. > > I see no reason to delay loading Carp::Heavy - it's very small and > > shouldn't affect performance. Moreover, if you wanna speedup Carp loading, > > then there a lot of other techniques - like moving POD to the bottom of > > file under __END__. Also consider just moving Carp::Heavy content to Carp, > > this shouldn't increase Carp module load time by any noticeable value and > > also allow to do some code cleanup. > > I tend to concur. Those days we have more CPU and memory resources, so > a cleanup to merge Carp::Heavy in Carp is totally feasible. Just as a data point, Carp::Heavy seems to use about 250Kbyte, which is, erm, quite heavy: (linux, 4K pagesize, 32-bit, blead, threaded, -O2): $ p -e 'system"ps -lfp $$"' F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S davem 9798 3295 0 80 0 - 1474 wait 14:50 pts/1 00:00:00 ./per $ p -MCarp -e 'system"ps -lfp $$"' F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S davem 9804 3295 0 80 0 - 1474 wait 14:50 pts/1 00:00:00 ./per $ p -MCarp::Heavy -e 'system"ps -lfp $$"' F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S davem 9814 3295 0 80 0 - 1540 wait 14:50 pts/1 00:00:00 ./per -- Art is anything that has a label (especially if the label is "untitled 1")Thread Previous | Thread Next