Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document trap: use lib with a huge directory is super slow #2199

Closed
zoffixznet opened this issue Jul 20, 2018 · 1 comment
Closed

Document trap: use lib with a huge directory is super slow #2199

zoffixznet opened this issue Jul 20, 2018 · 1 comment
Assignees
Labels
docs Documentation issue (primary issue type) trap

Comments

@zoffixznet
Copy link
Contributor

zoffixznet commented Jul 20, 2018

There's some discussion here with a user who struggled with a problem for a couple of days. I also recall a ticket either on RT or Rakudo's repo where this issue was discussed and IIRC nine++ pointed out that basically this is more or less normal (though, this might be considered a Rakudo-only implementation-specific problem, I guess).

Basically, when you include a dir with stuff like PERL6LIB, -I command line switch, or use lib, that dir becomes a "FileSystem" compilation unit repository and the compiler takes a snapshot of (only Perl 6, IIRC) files so that it would know whether any changes to the code in the FileSystem repository happened, so it would know to recompile any modules. Now, if you stick a path with a gazillion of files, it'll take ages taking that snapshot

For example, in my home dir, PERL6LIB=. time perl6 -e 'use Test' takes 59 seconds, but plain time perl6 -e 'use Test' takes only 0.2 seconds.

And the solution to this trap is to avoid using huge dirs like home dir as CU::Repositiory::FileSystem by not including them in PERL6LIB/-I/use lib

@zoffixznet zoffixznet added docs Documentation issue (primary issue type) easy to resolve labels Jul 20, 2018
@JJ
Copy link
Contributor

JJ commented Jul 21, 2018

The whole CUR is badly documented. See #502, for instance. Although including this trap would be quite straighforward, explaining how use lib works is not (and it's not documented either, see this. I'm going to remove "easy to resolve" for the time being, and leave it in the back burner.

@JJ JJ added trap and removed easy to resolve labels Jul 21, 2018
@coke coke added this to the 2023-First Quarter milestone Feb 8, 2023
@cfa cfa self-assigned this Mar 1, 2023
cfa added a commit to cfa/raku-doc that referenced this issue Mar 1, 2023
@cfa cfa closed this as completed in 160b0cf Mar 1, 2023
cfa added a commit that referenced this issue Mar 1, 2023
coke pushed a commit that referenced this issue May 9, 2023
coke pushed a commit that referenced this issue Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type) trap
Projects
None yet
Development

No branches or pull requests

4 participants