Re: Why so slow
On 4/28/19 4:26 PM, ToddAndMargo via perl6-users wrote: On 4/20/19 8:58 PM, ToddAndMargo via perl6-users wrote: Hi All, One liners are fast, but my own programs are very slow to start. I download https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 To check it out and it also takes ten second to start. What gives? Many thanks, -T Follow up: Figured it out. Well, ALMOST. (Watch the weasel word.) First I had to fix up zef. I posted it on another thread, but I will repost it here too: On 4/28/19 4:09 PM, ToddAndMargo via perl6-users wrote: > Well now, too many cooks spoil the stew. I did a full `dnf remove rakudo rakudo-zef` Then every "zef" entry (~.zif, /root/.zef, etc.) on my hard drive and erased it. And, every perl6 directory (opt, lib64, ~.perl6, etc.) and erased is too. Then reinstalled rakudo and rakudo-zef. Now zef is working right. Apparently, I hade too many different types/version of installs out there and everything was getting all mixed up. And low and behold, "Stage Parse" went from 13 seconds to 6 seconds: $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 5.727 Stage syntaxcheck: 0.000 Stage ast : 0.000 Stage optimize : 0.369 Stage mast : 1.210 Stage mbc : 0.021 Stage moar : 0.000 GetUpdates.pl6 Mozilla Mirror Debug is OFF Still about 5 seconds too slow, but a vast improvement. Thanks to everyone for all the tips and help! -T [18:18] ToddAndMargo: stage parse is where the compiler parses your source code into an AST (abstract syntax tree) before turning the AST into bytecode. it uses rakudo's grammar engine, which isn't very optimized yet -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~
Re: Why so slow
On 4/20/19 8:58 PM, ToddAndMargo via perl6-users wrote: Hi All, One liners are fast, but my own programs are very slow to start. I download https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 To check it out and it also takes ten second to start. What gives? Many thanks, -T Follow up: Figured it out. Well, ALMOST. (Watch the weasel word.) First I had to fix up zef. I posted it on another thread, but I will repost it here too: On 4/28/19 4:09 PM, ToddAndMargo via perl6-users wrote: > Well now, too many cooks spoil the stew. I did a full `dnf remove rakudo rakudo-zef` Then every "zef" entry (~.zif, /root/.zef, etc.) on my hard drive and erased it. And, every perl6 directory (opt, lib64, ~.perl6, etc.) and erased is too. Then reinstalled rakudo and rakudo-zef. Now zef is working right. Apparently, I hade too many different types/version of installs out there and everything was getting all mixed up. And low and behold, "Stage Parse" went from 13 seconds to 6 seconds: $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 5.727 Stage syntaxcheck: 0.000 Stage ast: 0.000 Stage optimize : 0.369 Stage mast : 1.210 Stage mbc: 0.021 Stage moar : 0.000 GetUpdates.pl6 Mozilla Mirror Debug is OFF Still about 5 seconds too slow, but a vast improvement. Thanks to everyone for all the tips and help! -T
library search path ?
Hi All, Could not find xxx::yyy at line zz in: file#/home/linuxutil/p6lib inst#/home/tony/.perl6 inst#/usr/lib64/perl6/site inst#/usr/lib64/perl6/vendor inst#/usr/lib64/perl6 ap# nqp# perl5# If I remember correctly, there was a way to ask Perl 5 for a list of the module paths from the command line. Right now I have to deliberately crash a program. Perl6 -h is not helping. How do I ask Perl 6 for this list from the command line the proper way? Many thanks, -T What is "ap#, nqp#, and perl5#" anyway?
Re: How do I fix this zef error?
On 4/28/19 12:45 AM, ToddAndMargo via perl6-users wrote: $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : ===SORRY!=== Could not find Net::SMTP at line 18 in: $ zef install Net::SMTP ===SORRY!=== Failed to open file /usr/lib64/perl6/site/dist/863D6AAB4F5E7259BA381C4EBE0F88BAA358090E: No such file or directory Well now, too many cooks spoil the stew. I did a full `dnf remove rakudo rakudo-zef` Then every "zef" entry (~.zif, /root/.zef, etc.) on my hard drive and erased it. And, every perl6 directory (ope, lib64, ~.perl6, etc.) and erased is too. Then reinstalled rakudo and rakudo-zef. Now zef is working right. Apparently, I hade too many different types/version of installs out there and everything was getting all mixed up.
What is the proper way to path a module in a non-standard directory
Apparently use lib 'path' is not the correct way. And especially not in a module itself that calls other modules.
What is the proper way to path a module in a non-standard directory
Apparently use lib 'path' is not the correct way. And especially not in a module itself that calls other modules.
Re: Something happened to the chat line
I'm just about to go to bed, but you can use this link instead (i think what was there before was just a redirect anyway): https://webchat.freenode.net/?channels=#perl6 HTH - Timo On 29/04/2019 00:38, ToddAndMargo via perl6-users wrote: > Hi All, > > Going to > > https://docs.perl6.org/ > > and clicking on "Chat with us" > > https://docs.perl6.org/webchat.html > > gives > > Page not found... yet! > > None of these routes could generate a response for your GET > request for /webchat.html, maybe you need to add a new one? > > > Please fix! > > Many thanks, > -T
Something happened to the chat line
Hi All, Going to https://docs.perl6.org/ and clicking on "Chat with us" https://docs.perl6.org/webchat.html gives Page not found... yet! None of these routes could generate a response for your GET request for /webchat.html, maybe you need to add a new one? Please fix! Many thanks, -T
Re: Why so slow
Brad Gilbert wrote: > For one it has the following line: > > use lib 'lib'; > > That is going to slow everything down if you have anything in the > `lib` directory. > The more things in that directory, the slower it will get. I've been seeing some pretty slow perl6 one-line invocations, where something like this might take 10 secs: perl6 -e'say "yellow"' This evidently has to do with this perl alias I use that loads a module: alias perl6='perl6 -Mmethod-menu' I do have a number of locations in my $PERL6LIB, and while they could certainly be trimmed down, the sheer number of them don't seem excessive to me (certainly not compared to my PERL5LIB): echo $PERL6LIB | tr ",", "\n" /home/doom/End/Cave/IntrospectP6/Wall/Object-Examine/lib/ /home/doom/End/Cave/IntrospectP6/Wall/Augment-Util/lib /home/doom/End/Cave/IntrospectP6/Wall/Symbol-Scan/lib /home/doom/End/Cave/IntrospectP6/Wall/method-menu/lib /home/doom/End/Cave/IntrospectP6/Wall/perl6-object-examine/lib/ /home/doom/End/Cave/IntrospectP6/Wall/perl6-augment-util/lib /home/doom/End/Cave/IntrospectP6/Wall/perl6-symbol-scan/lib /home/doom/End/Cave/IntrospectP6/Wall/perl6-method-menu/lib /home/doom/End/Cave/Perl6/lib /home/doom/End/Cave/Eye/lib/perl6 /home/doom/lib/perl6 /home/doom/End/Sys/Perl6/perl6-Perl6-Tidy-master/lib /home/doom/End/Sys/Perl6/perl6-Perl6-Parser-master/lib /home/doom/End/Sys/Perl6/p6-JSON-Pretty-master/lib Cutting those locations down to just three (most of them were empty, anyway): echo $PERL6LIB | tr ",", "\n" /home/doom/End/Cave/Perl6/lib /home/doom/End/Cave/Eye/lib/perl6 /home/doom/lib/perl6 Gets you a roughly 6x speed-up: time perl6 -e'say "Sy..."' Sy... real 0m1.685s
Re: Why so slow
ToddAndMargo via perl6-users wrote: > David Christensen wrote: >> We discussed this at our San Francisco Perl Mongers meeting today: > > Any Perl 5 guys there? And did they get "grouchy" with you > for using Perl 6? We've been doing an "Informal Perl6 Study Group" over at the Oakland Museum cafe every weekend. The idea is actually to talk about perl6 stuff, though pretty often we actually veer off into perl5, R, etc. And I don't usually get grumpy about it myself, though I'm a pretty grumpy character by nature.
Re: Why so slow
On 4/28/19 2:21 AM, Timo Paulssen wrote: the strace command ended up only tracing the shell script "perl6", which very quickly execs moar, at which point strace considers its job done. there was barely any output at all for that reason. fortunately we can just add -f to the strace command so that it follows processes as they are spawned. does /home/linuxutil have many files and folders in it? There are 275 files in it. Basically all my perl 5, perl 6 and bash scripts, along with a ton of supporting file (tmp, etc.). I will vpaste an ls if you need it, was the output from RAKUDO_MODULE_DEBUG going smoothly, or were there any points where it did any very long pauses? Could not tell. I sent the output to a file so I could vpaste it it does look a little like some of your individual modules have their own "use lib" commands in them, but i'm not exactly sure how it influences precompilation and such. They do. Is there another way to get Perl to looks for modules in other directories? I am out of business for the time being until I get that zef error fixed Thank you for all the help with this! -T
Re: Why so slow
the strace command ended up only tracing the shell script "perl6", which very quickly execs moar, at which point strace considers its job done. there was barely any output at all for that reason. fortunately we can just add -f to the strace command so that it follows processes as they are spawned. does /home/linuxutil have many files and folders in it? was the output from RAKUDO_MODULE_DEBUG going smoothly, or were there any points where it did any very long pauses? it does look a little like some of your individual modules have their own "use lib" commands in them, but i'm not exactly sure how it influences precompilation and such. On 28/04/2019 09:21, ToddAndMargo via perl6-users wrote: Hi Timo, This tell you anything? $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 13.150 Stage syntaxcheck: 0.000 Stage ast : 0.000 Stage optimize : 0.351 Stage mast : 1.133 Stage mbc : 0.019 Stage moar : 0.000 GetUpdates.pl6 <-- my program starts here Mozilla Mirror Debug is OFF The "Stage parse : 13.150" is eating me alive! -T On 4/28/19 12:01 AM, Timo Paulssen wrote:> Please give this a try: > > env RAKUDO_MODULE_DEBUG=1 perl6 GetUpdates.pl6 > > and tell me if any of the lines it spits out takes considerable amounts > of time before the next one shows up. > > Then, you can also > > strace -e stat perl6 GetUpdates.pl6 > > to see if it's going through a whole load of files. > > without the "-e stat" you will get a whole lot more output, but it'll > tell you pretty much everything that it's asking the kernel to do. > Pasting that whole file could be a privacy concern, especially if it > iterates your entire home directory, which is still my working hypothesis. > > HTH > - Timo > My home directory is pretty small, except for .wine. All the good stuff is on my network shares to share with my numerous VM's $ env RAKUDO_MODULE_DEBUG=1 perl6 GetUpdates.pl6 > GetUpdates.debug 2>&1 http://vpaste.net/xmwcd $ strace -e stat perl6 GetUpdates.pl6 > GetUpdates.debug 2>&1 http://vpaste.net/8ekeI
Re: Why so slow
On 4/27/19 10:40 PM, David Christensen wrote: We discussed this at our San Francisco Perl Mongers meeting today: Any Perl 5 guys there? And did they get "grouchy" with you for using Perl 6? Did they call Perl 6 "Java" by any chance? Chuckle.
Re: Why so slow
On 4/27/19 10:40 PM, David Christensen wrote: I suggested that he install the official package: https://rakudo.org/files The Rakudo site is degraded: "Currently, rakudo.org is being served from a back-up server that doesn't have the download files." I had previously downloaded installers for Debian and for macOS: 2019-04-28 00:14:14 dpchrist@tinkywinky ~/samba-dpchrist/Downloads/p/perl6 $ ls -1hs rakudo-* 11M rakudo-pkg-Debian9_2019.03.1-01_amd64.deb 6.0K rakudo-pkg-Debian9_2019.03.1-01_amd64.deb.sha1 25M rakudo-star-2019.03.dmg If anyone needs them, send me an e-mail off list. David
How do I fix this zef error?
$ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : ===SORRY!=== Could not find Net::SMTP at line 18 in: $ zef install Net::SMTP ===SORRY!=== Failed to open file /usr/lib64/perl6/site/dist/863D6AAB4F5E7259BA381C4EBE0F88BAA358090E: No such file or directory
Re: Why so slow
On 4/28/19 12:07 AM, Timo Paulssen wrote: I'm writing a program called moarperf, which is a local web app written in Cro that doesn't touch the network outside of loopback. It just has to build its JavaScript blobs once by downloading like a brazillion libraries from npm. That should be useful. Also, comma complete comes with support for profiling, which also doesn't need a live net connection. https://commaide.com/ Finally, I think at least Debian patches the profiler html app to point at an angularjs downloaded from Debian repositories. It's quite feasible to have an env var for nqp/rakudo that changes the path to the js libraries to something local. I use Mozilla Firefox with the NoScript plug-in -- that's how I saw that JavaScript is required. The profile pages seem to work on Debian at the present time if I do nothing (JavaScript is cached?), but requires JavaScript to be explicitly enabled on macOS. David
Re: Why so slow
On 4/28/19 12:01 AM, Timo Paulssen wrote: especially if it iterates your entire home directory Don't think so $ rm -rf ~/.perl6/precomp $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 13.201 Stage syntaxcheck: 0.000 Stage ast: 0.000 Stage optimize : 0.362 Stage mast : 1.099 Stage mbc: 0.029 Stage moar : 0.000 GetUpdates.pl6 Mozilla Mirror Debug is OFF Does this have anyting to do with it? 17: use lib '/home/linuxutil/p6lib'; 'use lib' may not be pre-compiled at /home/linuxutil/p6lib/CurlUtils.pm6 (CurlUtils):17
Re: Why so slow
Hi Timo, This tell you anything? $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 13.150 Stage syntaxcheck: 0.000 Stage ast : 0.000 Stage optimize : 0.351 Stage mast : 1.133 Stage mbc : 0.019 Stage moar : 0.000 GetUpdates.pl6 <-- my program starts here Mozilla Mirror Debug is OFF The "Stage parse : 13.150" is eating me alive! -T On 4/28/19 12:01 AM, Timo Paulssen wrote:> Please give this a try: > > env RAKUDO_MODULE_DEBUG=1 perl6 GetUpdates.pl6 > > and tell me if any of the lines it spits out takes considerable amounts > of time before the next one shows up. > > Then, you can also > > strace -e stat perl6 GetUpdates.pl6 > > to see if it's going through a whole load of files. > > without the "-e stat" you will get a whole lot more output, but it'll > tell you pretty much everything that it's asking the kernel to do. > Pasting that whole file could be a privacy concern, especially if it > iterates your entire home directory, which is still my working hypothesis. > > HTH >- Timo > My home directory is pretty small, except for .wine. All the good stuff is on my network shares to share with my numerous VM's $ env RAKUDO_MODULE_DEBUG=1 perl6 GetUpdates.pl6 > GetUpdates.debug 2>&1 http://vpaste.net/xmwcd $ strace -e stat perl6 GetUpdates.pl6 > GetUpdates.debug 2>&1 http://vpaste.net/8ekeI
Re: Why so slow
I'm writing a program called moarperf, which is a local web app written in Cro that doesn't touch the network outside of loopback. It just has to build its JavaScript blobs once by downloading like a brazillion libraries from npm. Also, comma complete comes with support for profiling, which also doesn't need a live net connection. Finally, I think at least Debian patches the profiler html app to point at an angularjs downloaded from Debian repositories. It's quite feasible to have an env var for nqp/rakudo that changes the path to the js libraries to something local. On 28 April 2019 09:01:28 CEST, David Christensen wrote: >> On 21/04/2019 05:58, ToddAndMargo via perl6-users wrote: >>> Hi All, >>> >>> One liners are fast, but my own programs are very slow to start. >>> >>> I download >>> >>> https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 >>> >>> >>> To check it out and it also takes ten second to start. >> >>> What gives? >>> >>> Many thanks, -T > > >On 4/27/19 11:14 PM, Timo Paulssen wrote: >> You don't happen to have a PERL6LIB or -I pointed at a folder with >> loads of stuff in it? If that is the case, having a single "use" >> statement will cause rakudo to iterate through all files and >> subfolders, which can take a long time if you've got, for example, >> your home directory in that list (be it via -I. or PERL6LIB=. or >> explicitly mentioning the big folder) >> >> There's many different tools to find out what's going on. For the >> "too big perl6lib folder" problem, "strace" will give you a good hint >> by giving one "stat" command for every file under your home >> directory. >> >> Other than that, check "perl6 --stagestats -e 'blah'" or "perl6 >> --stagestats FooBar.p6", which will give timings for the different >> phases, most notably "parse", "optimize", and "mbc". loading modules >> and precompiling are part of the parse stage. >> >> the "time" command will split your run time between "system" and >> "user" time (as well as wallclock time). if "system" is particularly >> high, then the program spends a lot of time asking the kernel to do >> stuff (such as iterating files on the filesystem for the PERL6LIB >> case i've menitoned above). >> >> If none of that helps, startup can be profiled with "perl6 >> --profile-compile blah" and run time can be profiled with "perl6 >> --profile blah". The default output will be a html file that you can >> just open in your browser to get an interactive performance >> inspection tool thingie. Be aware, though, that it can become very >> big in the case of --profile-compile, depending on the structure of >> the program being compiled. >> >> Hope any of that helps - Timo > > >Yes, very useful -- thank you. :-) > > >(I do not seem to have a man page for Perl 6, but 'perl6 --help' gives >a >brief overview of those options.) > > >The only drawback is that the HTML profile reports require JavaScript >and a live Internet connection to function. > > >David -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Re: Why so slow
Please give this a try: env RAKUDO_MODULE_DEBUG=1 perl6 GetUpdates.pl6 and tell me if any of the lines it spits out takes considerable amounts of time before the next one shows up. Then, you can also strace -e stat perl6 GetUpdates.pl6 to see if it's going through a whole load of files. without the "-e stat" you will get a whole lot more output, but it'll tell you pretty much everything that it's asking the kernel to do. Pasting that whole file could be a privacy concern, especially if it iterates your entire home directory, which is still my working hypothesis. HTH - Timo On 28/04/2019 08:41, ToddAndMargo via perl6-users wrote: > On 21/04/2019 05:58, ToddAndMargo via perl6-users wrote:>> Hi All, >> >> One liners are fast, but my own programs are very slow to start. >> >> I download >> >> https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 >> >> To check it out and it also takes ten second to start. >> >> What gives? >> >> Many thanks, >> -T On 4/27/19 11:14 PM, Timo Paulssen wrote: You don't happen to have a PERL6LIB or -I pointed at a folder with loads of stuff in it? If that is the case, having a single "use" statement will cause rakudo to iterate through all files and subfolders, which can take a long time if you've got, for example, your home directory in that list (be it via -I. or PERL6LIB=. or explicitly mentioning the big folder) There's many different tools to find out what's going on. For the "too big perl6lib folder" problem, "strace" will give you a good hint by giving one "stat" command for every file under your home directory. Other than that, check "perl6 --stagestats -e 'blah'" or "perl6 --stagestats FooBar.p6", which will give timings for the different phases, most notably "parse", "optimize", and "mbc". loading modules and precompiling are part of the parse stage. the "time" command will split your run time between "system" and "user" time (as well as wallclock time). if "system" is particularly high, then the program spends a lot of time asking the kernel to do stuff (such as iterating files on the filesystem for the PERL6LIB case i've menitoned above). If none of that helps, startup can be profiled with "perl6 --profile-compile blah" and run time can be profiled with "perl6 --profile blah". The default output will be a html file that you can just open in your browser to get an interactive performance inspection tool thingie. Be aware, though, that it can become very big in the case of --profile-compile, depending on the structure of the program being compiled. Hope any of that helps - Timo Hi Timo, This tell you anything? $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 13.150 Stage syntaxcheck: 0.000 Stage ast : 0.000 Stage optimize : 0.351 Stage mast : 1.133 Stage mbc : 0.019 Stage moar : 0.000 GetUpdates.pl6 <-- my program starts here Mozilla Mirror Debug is OFF The "Stage parse : 13.150" is eating me alive! -T
Re: Why so slow
On 21/04/2019 05:58, ToddAndMargo via perl6-users wrote: Hi All, One liners are fast, but my own programs are very slow to start. I download https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 To check it out and it also takes ten second to start. >> What gives? Many thanks, -T On 4/27/19 11:14 PM, Timo Paulssen wrote: You don't happen to have a PERL6LIB or -I pointed at a folder with loads of stuff in it? If that is the case, having a single "use" statement will cause rakudo to iterate through all files and subfolders, which can take a long time if you've got, for example, your home directory in that list (be it via -I. or PERL6LIB=. or explicitly mentioning the big folder) There's many different tools to find out what's going on. For the "too big perl6lib folder" problem, "strace" will give you a good hint by giving one "stat" command for every file under your home directory. Other than that, check "perl6 --stagestats -e 'blah'" or "perl6 --stagestats FooBar.p6", which will give timings for the different phases, most notably "parse", "optimize", and "mbc". loading modules and precompiling are part of the parse stage. the "time" command will split your run time between "system" and "user" time (as well as wallclock time). if "system" is particularly high, then the program spends a lot of time asking the kernel to do stuff (such as iterating files on the filesystem for the PERL6LIB case i've menitoned above). If none of that helps, startup can be profiled with "perl6 --profile-compile blah" and run time can be profiled with "perl6 --profile blah". The default output will be a html file that you can just open in your browser to get an interactive performance inspection tool thingie. Be aware, though, that it can become very big in the case of --profile-compile, depending on the structure of the program being compiled. Hope any of that helps - Timo Yes, very useful -- thank you. :-) (I do not seem to have a man page for Perl 6, but 'perl6 --help' gives a brief overview of those options.) The only drawback is that the HTML profile reports require JavaScript and a live Internet connection to function. David
Re: precomp?
On 4/27/19 9:01 PM, Gene Nardi wrote: Hey. I’m just glad it doesn’t take a whole day for a run anymore. Like in the old days. Gene Nardi Sent from my iPhone I hated punch cards!
Re: Why so slow
> On 21/04/2019 05:58, ToddAndMargo via perl6-users wrote:>> Hi All, >> >> One liners are fast, but my own programs are very slow to start. >> >> I download >> >> https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 >> >> To check it out and it also takes ten second to start. >> >> What gives? >> >> Many thanks, >> -T On 4/27/19 11:14 PM, Timo Paulssen wrote: You don't happen to have a PERL6LIB or -I pointed at a folder with loads of stuff in it? If that is the case, having a single "use" statement will cause rakudo to iterate through all files and subfolders, which can take a long time if you've got, for example, your home directory in that list (be it via -I. or PERL6LIB=. or explicitly mentioning the big folder) There's many different tools to find out what's going on. For the "too big perl6lib folder" problem, "strace" will give you a good hint by giving one "stat" command for every file under your home directory. Other than that, check "perl6 --stagestats -e 'blah'" or "perl6 --stagestats FooBar.p6", which will give timings for the different phases, most notably "parse", "optimize", and "mbc". loading modules and precompiling are part of the parse stage. the "time" command will split your run time between "system" and "user" time (as well as wallclock time). if "system" is particularly high, then the program spends a lot of time asking the kernel to do stuff (such as iterating files on the filesystem for the PERL6LIB case i've menitoned above). If none of that helps, startup can be profiled with "perl6 --profile-compile blah" and run time can be profiled with "perl6 --profile blah". The default output will be a html file that you can just open in your browser to get an interactive performance inspection tool thingie. Be aware, though, that it can become very big in the case of --profile-compile, depending on the structure of the program being compiled. Hope any of that helps - Timo Hi Timo, This tell you anything? $ perl6 --stagestats GetUpdates.pl6 Stage start : 0.000 Stage parse : 13.150 Stage syntaxcheck: 0.000 Stage ast: 0.000 Stage optimize : 0.351 Stage mast : 1.133 Stage mbc: 0.019 Stage moar : 0.000 GetUpdates.pl6 <-- my program starts here Mozilla Mirror Debug is OFF The "Stage parse : 13.150" is eating me alive! -T
Re: Why so slow
On 4/27/19 10:40 PM, David Christensen wrote: What is your operating system? Fedora 29 x64 Xfce 4.13 $ uname -r 5.0.7-200.fc29.x86_64 What is your Perl 6? $ rpm -qa rakudo rakudo-0.2019.03-1.fc29.x86_64 Also tried: https://github.com/nxadm/rakudo-pkg/releases rakudo-pkg-Fedora29-2018.11-01.x86_64.rpm rakudo-pkg-Fedora29-2019.03.1-01.x86_64.rpm No symptom change
Re: Why so slow
You don't happen to have a PERL6LIB or -I pointed at a folder with loads of stuff in it? If that is the case, having a single "use" statement will cause rakudo to iterate through all files and subfolders, which can take a long time if you've got, for example, your home directory in that list (be it via -I. or PERL6LIB=. or explicitly mentioning the big folder) There's many different tools to find out what's going on. For the "too big perl6lib folder" problem, "strace" will give you a good hint by giving one "stat" command for every file under your home directory. Other than that, check "perl6 --stagestats -e 'blah'" or "perl6 --stagestats FooBar.p6", which will give timings for the different phases, most notably "parse", "optimize", and "mbc". loading modules and precompiling are part of the parse stage. the "time" command will split your run time between "system" and "user" time (as well as wallclock time). if "system" is particularly high, then the program spends a lot of time asking the kernel to do stuff (such as iterating files on the filesystem for the PERL6LIB case i've menitoned above). If none of that helps, startup can be profiled with "perl6 --profile-compile blah" and run time can be profiled with "perl6 --profile blah". The default output will be a html file that you can just open in your browser to get an interactive performance inspection tool thingie. Be aware, though, that it can become very big in the case of --profile-compile, depending on the structure of the program being compiled. Hope any of that helps - Timo On 21/04/2019 05:58, ToddAndMargo via perl6-users wrote: Hi All, One liners are fast, but my own programs are very slow to start. I download https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 To check it out and it also takes ten second to start. What gives? Many thanks, -T