Tim Bunce wrote:

> p.p.s A good first step would be to add a stub merge_profile_data_from_file()
> method and update nytprofhtml to use it.  Perhaps via a
> Devel::NYTProf::Data->new_merged({ files => \...@files }) method that
> calls load_profile_data_from_file() for the first and
> merge_profile_data_from_file() for the rest.

I started down this path.  In the process this *feeling* that having the
normal constructor modified to handle the merging would be best.  Here is a
snippet what I have to give you an idea:

    print "Reading $file\n" unless $args->{quiet};

    my $profile = load_profile_data_from_file($file);
    bless $profile => $class;
    
    foreach (@{$args->{filenames}}) {
        print "Reading $_\n" unless $args->{quiet};
        $profile->merge_profile_data_from_file($_);
    }

    my $fid_fileinfo = $profile->{fid_fileinfo};
    my $sub_subinfo  = $profile->{sub_subinfo};

Is this workable and hopefully better than your suggestion or am I off base
here.  It seemed like the fileinfo and subinfo work being done from that
point on would need to be done on all the data so getting the data together
before that would be best.  Of course, at this point I have yet to figure
out what all the fileinfo and subinfo code is about or what should be really
be happening in my empty merge_profile_data_from_file so I'm kind of
shooting in the dark here.

I should likely start following your advise about profiling to find out
about each kind of data here soon like...

--
David Steinbrunner



--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to