You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@sergeant.org on 2006/08/21 23:24:26 UTC

[SVN] [104] Only load Data::Dumper and Devel::GC::Helper in the forked process so as not to bloat the parent

Revision: 104
Author:   matt
Date:     2006-08-21 21:24:07 +0000 (Mon, 21 Aug 2006)

Log Message:
-----------
Only load Data::Dumper and Devel::GC::Helper in the forked process so as not to bloat the parent

Modified Paths:
--------------
    trunk/lib/AxKit2/Console.pm

Modified: trunk/lib/AxKit2/Console.pm
===================================================================
--- trunk/lib/AxKit2/Console.pm	2006-08-18 22:47:27 UTC (rev 103)
+++ trunk/lib/AxKit2/Console.pm	2006-08-21 21:24:07 UTC (rev 104)
@@ -261,6 +261,12 @@
     my $dump = shift || '';
     $dump = (uc($dump) eq 'DUMP') ? 1 : 0;
     
+    $self->write("Gathering GC stats in the background...\n");
+    
+    my $pid = fork;
+    die "Can't fork" unless defined $pid;
+    return if $pid;
+
     require Devel::GC::Helper;
     if ($dump) {
         require Data::Dumper;
@@ -269,12 +275,6 @@
         #$Data::Dumper::Deparse = 1;
     }
     
-    $self->write("Gathering GC stats in the background...\n");
-    
-    my $pid = fork;
-    die "Can't fork" unless defined $pid;
-    return if $pid;
-
     # Child - run the leak sweep...
     my $leaks = Devel::GC::Helper::sweep();
     foreach my $leak (@$leaks) {