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

Problem: install_names evaluation takes too long #241

Open
clacke opened this issue Dec 5, 2018 · 0 comments
Open

Problem: install_names evaluation takes too long #241

clacke opened this issue Dec 5, 2018 · 0 comments

Comments

@clacke
Copy link
Member

clacke commented Dec 5, 2018

For fractalide we are taking on the order of a minute to figure out which packages are already installed and which aren't.

Solution: Instead of firing up racket for each package, evaluate all packages within one racket call.

clacke added a commit to clacke/fractalide that referenced this issue Dec 5, 2018
It's examining every directory of documentation, rust code etc for
racket files to compile, and it's very slow at doing so.

Solution: Make `fractalide.src` narrower, with explicit directories.

NOTE: `builtins.path` uses its filter function differently from
`builtins.filterSource` -- a directory needs to be filtered `true` for
`path` to descend into the directory.

A `filterSource` condition could have been:
    (null != builtins.match ((toString ./..) + "(/info.rkt|/(modules|edges|nodes)/rkt/.*)") path)

... but for `path` the `/rkt/.*` needs to be optional so the parent
directory matches, and within `/rkt/.*` the `/.*` needs to be optional
so the `rkt` directory matches. That's why the slightly convoluted
`(/rkt(/.*)?)?`.

Now, on my machine the difference is not great, because it takes a
ridiculously long time anyway:

Before:

real	11m33,282s
user	0m3,544s
sys	0m0,514s

After:

real	11m22,826s
user	0m2,008s
sys	0m0,497s

One of those minutes is due to fractalide/racket2nix#241, but I think
there may also be something odd about my system. Maybe it's the /nix
on ZFS, maybe it's something else.
clacke added a commit to clacke/fractalide that referenced this issue Dec 5, 2018
It's examining every directory of documentation, rust code etc for
racket files to compile, and it's very slow at doing so.

Solution: Make `fractalide.src` narrower, with explicit directories.

NOTE: `builtins.path` uses its filter function differently from
`builtins.filterSource` -- a directory needs to be filtered `true` for
`path` to descend into the directory.

A `filterSource` condition could have been:
    (null != builtins.match ((toString ./..) + "(/info.rkt|/(modules|edges|nodes)/rkt/.*)") path)

... but for `path` the `/rkt/.*` needs to be optional so the parent
directory matches, and within `/rkt/.*` the `/.*` needs to be optional
so the `rkt` directory matches. That's why the slightly convoluted
`(/rkt(/.*)?)?`.

Now, on my machine the difference is not great, because it takes a
ridiculously long time anyway:

Before:

real	11m33,282s
user	0m3,544s
sys	0m0,514s

After:

real	11m22,826s
user	0m2,008s
sys	0m0,497s

One of those minutes is due to fractalide/racket2nix#241, but I think
there may also be something odd about my system. Maybe it's the /nix
on ZFS, maybe it's something else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant