Re: Any sign of a fix for the 10 second compile time?

2020-08-01 Thread ToddAndMargo via perl6-users

$ time raku --stagestats -c GetUpdates.pl6
Stage start  :   0.000
Stage parse  :  18.405
Stage syntaxcheck: Syntax OK

real0m18.449s
user0m20.673s
sys0m0.223s 


On 2020-08-01 10:30, Richard Hainsworth wrote:
What you are asking for is not a bug, but a part of the current stage of 
design. It will probably get quicker.




For "not a bug but we are working on it", the
tracking site is

https://github.com/Raku/problem-solving

Do you know if the slow parser has got an open tracker?

Thank you for the work around in the mean time.
I will suffer with the slow parser for now
as I do not want to get zef involved at the moment.

-T


Re: Any sign of a fix for the 10 second compile time?

2020-08-01 Thread Richard Hainsworth

Tom,

I was not clear. I didn't intend to say/mean a different **zef** repo, 
but a different Precompilation Cache.


I have done this with Pod::From::Cache. If you think this is worth 
discussing in the docs, let me know.


On the other hand, I recompiled raku to make a change, and it needed 
access to the existing zef repo, so I symlinked the ../site directory to 
the one that zef uses. So ... I suppose it might be possible to hack 
something simply by changing symlinks. Not sure it would be a neat way 
of doing things.


Besides, zef and raku have environment variables that should handle 
this. I haven't looked at how to do this neatly yet.


Richard

On 01/08/2020 19:33, Tom Browder wrote:
On Sat, Aug 1, 2020 at 12:30 Richard Hainsworth 
mailto:rnhainswo...@gmail.com>> wrote:


What you are asking for is not a bug, but a part of the current
stage of
design. It will probably get quicker.


Richard, you should find an appropriate place in the docs and add a 
section on setting up your personal zef repo.


Thanks.

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-08-01 Thread Tom Browder
On Sat, Aug 1, 2020 at 12:30 Richard Hainsworth 
wrote:

> What you are asking for is not a bug, but a part of the current stage of
> design. It will probably get quicker.


Richard, you should find an appropriate place in the docs and add a section
on setting up your personal zef repo.

Thanks.

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-08-01 Thread Richard Hainsworth

Todd

What you are asking for is not a bug, but a part of the current stage of 
design. It will probably get quicker.


However, the biggest part of the timing is the compilation - as you have 
noticed.


When you precompile a module, it stores the byte code. Then it runs 
quite well.


Now it IS possible to set up a precomp store of your own, but isn't 
worth the hassle.


zef does all of that for you. So the best thing is to find a way to get 
zef to install your modules.


Naturally if you change anything in them, you will need to bump the 
version number in the META6.json file and then reinstall.


Failure problems with zef, so long as your module compiles, involves 
good housekeeping. zef will look for tests and run them. I cannot 
program anything now without tests, they are SOOO useful.


Then the structure of the module directory has to be right. But once you 
have got things working once, it becomes much easier.


I have a directory called .perl and inside it is just a META.json which 
lists in the depends field all  my favourite modules. Then I use zef to 
install deps.


On 01/08/2020 01:08, ToddAndMargo via perl6-users wrote:

On 2020-07-31 16:40, Tom Browder wrote:

On Fri, Jul 31, 2020 at 5:38 PM ToddAndMargo via perl6-users
 wrote:

Todd, a couple of questions:
1. In your modules that change all the time, do have "use lib ...;"
statements in any of them?


No.  If I do, they crash


# use lib '/home/linuxutil/p6lib';   # may not be precompiled; calling
program must take care of this



Just for "-O fun", set up your modules as if they were to be public,
i.e., add a META6.jso for the module collection.
The collection being "/path/to/MyModules" and in MyModules create:

  META6.json # create it and add all your modules in it just like
you were going to publish the whole mess.
  ./lib/
 # my modules as moved or duped from "/home/linuxutil/p6lib"
  t/
 00-meta-test.t # some basic test to check your META6.json file

Then, in dir "/path/to/MyModules" try:

 $ zef install .  # <== that's a DOT/PERIOD, i.e., the current 
directory


If that works, then you should be able to "use" them from your program.

-Tom





Hi Tom,

I am really after is what I originally asked.  Is this
issue any closer to being solved?  And is there
a bug I can get myself Cc'ed on to.

When I get a chance at it again, I will
will look into the workaround.  Thank you.

What compiles in 1/2 seconds on Perl 5 should not
take 18 seconds on Perl 6.

It is the "parse" stage this is the issue.

$ time raku --stagestats -c GetUpdates.pl6
Stage start  :   0.000
Stage parse  :  18.405
Stage syntaxcheck: Syntax OK

real    0m18.449s
user    0m20.673s
sys    0m0.223s


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread ToddAndMargo via perl6-users

On 2020-07-31 16:40, Tom Browder wrote:

On Fri, Jul 31, 2020 at 5:38 PM ToddAndMargo via perl6-users
 wrote:

Todd, a couple of questions:
1. In your modules that change all the time, do have "use lib ...;"
statements in any of them?


No.  If I do, they crash


# use lib '/home/linuxutil/p6lib';   # may not be precompiled; calling
program must take care of this



Just for "-O fun", set up your modules as if they were to be public,
i.e., add a META6.jso for the module collection.
The collection being "/path/to/MyModules" and in MyModules create:

  META6.json # create it and add all your modules in it just like
you were going to publish the whole mess.
  ./lib/
 # my modules as moved or duped from "/home/linuxutil/p6lib"
  t/
 00-meta-test.t # some basic test to check your META6.json file

Then, in dir "/path/to/MyModules" try:

 $ zef install .  # <== that's a DOT/PERIOD, i.e., the current directory

If that works, then you should be able to "use" them from your program.

-Tom





Hi Tom,

I am really after is what I originally asked.  Is this
issue any closer to being solved?  And is there
a bug I can get myself Cc'ed on to.

When I get a chance at it again, I will
will look into the workaround.  Thank you.

What compiles in 1/2 seconds on Perl 5 should not
take 18 seconds on Perl 6.

It is the "parse" stage this is the issue.

$ time raku --stagestats -c GetUpdates.pl6
Stage start  :   0.000
Stage parse  :  18.405
Stage syntaxcheck: Syntax OK

real0m18.449s
user0m20.673s
sys 0m0.223s


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Tom Browder
On Fri, Jul 31, 2020 at 5:38 PM ToddAndMargo via perl6-users
 wrote:
> >> Todd, a couple of questions:
> >> 1. In your modules that change all the time, do have "use lib ...;"
> >> statements in any of them?
> >
> > No.  If I do, they crash
>
> # use lib '/home/linuxutil/p6lib';   # may not be precompiled; calling
> program must take care of this


Just for "-O fun", set up your modules as if they were to be public,
i.e., add a META6.jso for the module collection.
The collection being "/path/to/MyModules" and in MyModules create:

 META6.json # create it and add all your modules in it just like
you were going to publish the whole mess.
 ./lib/
# my modules as moved or duped from "/home/linuxutil/p6lib"
 t/
00-meta-test.t # some basic test to check your META6.json file

Then, in dir "/path/to/MyModules" try:

$ zef install .  # <== that's a DOT/PERIOD, i.e., the current directory

If that works, then you should be able to "use" them from your program.

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread ToddAndMargo via perl6-users

On 2020-07-31 15:36, ToddAndMargo via perl6-users wrote:

On 2020-07-31 15:32, Tom Browder wrote:
On Fri, Jul 31, 2020 at 14:55 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


 >> On Fri, Jul 31, 2020, 04:45 ToddAndMargo via perl6-users
 >> mailto:perl6-users@perl.org>
    >> wrote:


Todd, a couple of questions:

1. In your modules that change all the time, do have "use lib ...;" 
statements in any of them?


No.  If I do, they crash


# use lib '/home/linuxutil/p6lib';   # may not be precompiled; calling 
program must take care of this







2. If the answer to 1. is true, did you know you can use zef to 
install your own, non-published modules and then remove "use lib...;" 
statements from your modules and your programs?


-Tom



--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread ToddAndMargo via perl6-users

On 2020-07-31 15:32, Tom Browder wrote:
On Fri, Jul 31, 2020 at 14:55 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


 >> On Fri, Jul 31, 2020, 04:45 ToddAndMargo via perl6-users
 >> mailto:perl6-users@perl.org>
>> wrote:


Todd, a couple of questions:

1. In your modules that change all the time, do have "use lib ...;" 
statements in any of them?


No.  If I do, they crash



2. If the answer to 1. is true, did you know you can use zef to install 
your own, non-published modules and then remove "use lib...;" statements 
from your modules and your programs?


-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Tom Browder
On Fri, Jul 31, 2020 at 14:55 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> >> On Fri, Jul 31, 2020, 04:45 ToddAndMargo via perl6-users
> >> mailto:perl6-users@perl.org>> wrote:


Todd, a couple of questions:

1. In your modules that change all the time, do have "use lib ...;"
statements in any of them?

2. If the answer to 1. is true, did you know you can use zef to install
your own, non-published modules and then remove "use lib...;" statements
from your modules and your programs?

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread ToddAndMargo via perl6-users
>> On 31 Jul 2020, at 03:45, ToddAndMargo via perl6-users 
 wrote:

>>
>> Hi All,
>>
>> Any sign of a fix for the 10 second compile time?
>>
>> Do you know if a bug has been opened on it so I can
>> sign up for the CC?
>>
>> Many thanks,
>> -T

On 2020-07-31 01:40, Elizabeth Mattijsen wrote:

$ time raku -e ''

real0m0.120s
user0m0.111s
sys 0m0.022s

Doesn't take 10 seconds for me.



That is not what I am speaking of.

My 8978 line plus modules program was ported
over from Perl 5.  On Perl 5, it fires up in about
1/2 second, not 10  seconds. I was told they are
working on it.  And whilst I wait, to put the main
part of my program in a module so .precomp would
take care of it.  That is not always practical.

By the way, I do not know if your remember it, but
you sent me the same test about a years ago when I
first asked about it.

:-)


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread ToddAndMargo via perl6-users
On Fri, Jul 31, 2020, 04:45 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


Hi All,

    Any sign of a fix for the 10 second compile time?

Do you know if a bug has been opened on it so I can
sign up for the CC?

Many thanks,
-T



On 2020-07-31 02:09, Veesh Goldman wrote:
Does your code have a 'use lib "lib"' line by any chance? Because 
that'll make raku recompile everything in each directory you run your 
script in.

I had this problem once, so I'm guessing that might be what happened to you?



Hi Veesh,

Well, as a matter of fact, yes.  I use modules *A LOT*.
And I seldom zef them into the system as I am constantly
modifying and upgrading them.

The worst offender is my update checker.  It takes
10 seconds to start.  It is 8978 lines long.  And at
8978 lines long, it is a program, not a script.  :-)

use lib '/home/linuxutil/p6lib';
use CurlUtils :CurlDownloadFile, :CurlGetWebSite, :CurlGetHeader, 
:CurlExists, :CurlSendMail, :CurlGetRedirectUrl;
use PrintColors :PrintRed, :PrintGreen, :PrintBlue, :PrintErr, 
:PrintRedErr, :PrintGreenErr, :PrintBlueErr;

use PauseLib :Pause;
use RunNoShellLib :RunNoShell, :RunNoShellCode, :RunNoShellErr;
use CheckSystemDependancy :Which, :CheckSysDependancy;


The second is my Cobian Wrapper that runs in Windows.  It
pops up a black box for about 8 seconds before starting.
Just enough time for the user to thump the "X" in the
upper right and mangle their backups.  I have an RFE in
your the pop up thing.

https://github.com/rakudo/rakudo/issues/3582#issuecomment-661081445

Cobian Wrapper is 521 lines long and is also a program.  :-)

use lib 'C:/NtUtil';
use Getopt::Long;  # get-options
use WinMessageBox :MessageBox;
use WinMount :GetLUA, :SetLUA, :ListPartitions, :Mount, :Umount,
 :FindPartitionByLabel, :FindPartitionByUUID, 
:FindPartitionByDrive;


And several of the modules call other moduels

".precomp" is in full force.  I do not see them recompiled
each time.

About a years of so ago, I asked about this problem.
I was told whilst they work on this, to put the main
part of my program into a module, so it was only
compiled once.  That is not always practical.

The update program was ported over from Perl 5.  On
Perl 5, it fires up in about 1/2 second, not 10 seconds.
Again, I was told they are working on it.

Anyone know if there is a bug report on it I could
Cc on?

Many thanks,
-T


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread ToddAndMargo via perl6-users

On 2020-07-31 01:41, Richard Hainsworth wrote:

odd,

Strangely after all the correspondence we have had, but I am unable to 
read your mind, and so understand your question.


Perhaps you could have pity on me and give me a bit more information about

a) which bug has appeared

b) what is it that you are compiling

c) a short snippet of code with the timing data (you can get that by 
setting an option in the rakudo command line)


yours non-telepathically

Richard


You can't read my mind?  KIDS THESE DAYS!!!

See my response to Veesh


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Veesh Goldman
Does your code have a 'use lib "lib"' line by any chance? Because that'll
make raku recompile everything in each directory you run your script in.
I had this problem once, so I'm guessing that might be what happened to you?

On Fri, Jul 31, 2020, 04:45 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> Hi All,
>
> Any sign of a fix for the 10 second compile time?
>
> Do you know if a bug has been opened on it so I can
> sign up for the CC?
>
> Many thanks,
> -T
>


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Richard Hainsworth

Todd,

Strangely after all the correspondence we have had, but I am unable to 
read your mind, and so understand your question.


Perhaps you could have pity on me and give me a bit more information about

a) which bug has appeared

b) what is it that you are compiling

c) a short snippet of code with the timing data (you can get that by 
setting an option in the rakudo command line)


yours non-telepathically

Richar

On 31/07/2020 02:45, ToddAndMargo via perl6-users wrote:

Hi All,

Any sign of a fix for the 10 second compile time?

Do you know if a bug has been opened on it so I can
sign up for the CC?

Many thanks,
-T


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Elizabeth Mattijsen
$ time raku -e ''

real0m0.120s
user0m0.111s
sys 0m0.022s

Doesn't take 10 seconds for me.


> On 31 Jul 2020, at 03:45, ToddAndMargo via perl6-users  
> wrote:
> 
> Hi All,
> 
> Any sign of a fix for the 10 second compile time?
> 
> Do you know if a bug has been opened on it so I can
> sign up for the CC?
> 
> Many thanks,
> -T


Any sign of a fix for the 10 second compile time?

2020-07-30 Thread ToddAndMargo via perl6-users

Hi All,

Any sign of a fix for the 10 second compile time?

Do you know if a bug has been opened on it so I can
sign up for the CC?

Many thanks,
-T