Hi,

On 10/24/2015 09:52 AM, Timo Paulssen wrote:
> On 24/10/15 09:40, Moritz Lenz wrote:
>> Hi Gabor,
>>
>> On 10/24/2015 09:26 AM, Gabor Szabo wrote:
>>> The Devel::NYTProf helped me a lot locating the source of slowness on
>>> the Perl Maven site.
>>> Is there something similar for Perl 6 so I can try to improve the speed
>>> of the Perl 6 Maven site too?
>> Rakudo has a --profile command line option, which generates a HTML file
>> containing a single-page JS app that presents the profiling data.
>>
>> But you should take care to only profile short program executions that
>> way (a few seconds at most), otherwise the result will be unusable in
>> the browser.
>>
>> Cheers,
>> Moritz
> 
> It's a common tip to "only profile short program executions", but that 
> misses the actual point by a few centimeters. The things that makes the 
> profiler super slow are:

The profiler, or the web app generated by the profiler? Curently I
mostly care about the latter.

> 1) having a gigantic amount of different subs and methods that get 
> touched by the program at some point
> 2) having very, very deep call chains
> 3) having the GC run thousands of collections
> 
> if I understand correctly.
>
>
> Recently, Coke++ switched the profiler JS app from a kind of old version 
> of angular.js to a newer version that has had lots of performance 
> improvements done to it by the google devs; i expect that helps 
> tremendously, though i have not actually measured anything beyond a new 
> feeling of "snappyness".

I've tried to profile htmlify.p6 in the perl6/doc repo; it has a
--sparse option to make it process fewer files and thus generate less
profiler output.

With --sparse=200, it takes about 22s to run on hack.p6c.org. I managed
to run it with --profile, but the generated profile still doesn't work
in any browser I tried. See
http://hack.p6c.org/~moritz/profile-1445674278.30788.html for the output.

If anybody manages to get it to render, please send me some screenshot :-)

I don't know if htmlify.p6 has deep call chains; it does some recursion
along the Pod tree, but I'd be surprised if that's more than 20 levels deep.

Cheers,
Moritz

Reply via email to