Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Very slow / hangs #519

Closed
Closed

Description

@freeman42x

For example open this repository using HIE for Atom or VSCode and then open Build.hs, in both editors the CPU will get maxed out for minutes (I don't know if it ever stops). During this time Atom interface hangs and nothing is being shown on hover in any of them.

Activity

  1. alanz commented on Apr 10, 2018

    @alanz
    Collaborator

    The feedback still needs to be optimised, so we can know what is happening, and whether it is still doing anything useful. See #460

  2. infinisil commented on Aug 24, 2018

    @infinisil
    Contributor

    I'm getting this too now, hasn't happened with the HIE version I used previously (I think that was c68ba8d, now using master (d769a30)). I could do a bisection if that's wanted.

    It's unbearably slow, hangs for around 3 minutes at 100% CPU. Looking at the system calls (via htop) reveals no calls happening. No subprocesses running either. The logs silent during that time, and my emacs hangs upon typing during that time.

    It happens every time HIE gets restarted, there's no caching happening.

  3. added a commit that references this issue on Aug 25, 2018
    ef14368
  4. infinisil commented on Aug 26, 2018

    @infinisil
    Contributor
  5. infinisil commented on Aug 26, 2018

    @infinisil
    Contributor

    Apparently the reason for my slowdown was TemplateHaskell. Removing all {-# LANGUAGE TemplateHaskell #-} from the closure of all imported modules of my own makes it go fast again.

  6. infinisil commented on Aug 26, 2018

    @infinisil
    Contributor

    Note that this slowdown only happens exactly once during a HIE run. And it happens whenever it first encounters a module using template haskell. This means I can write a simple

    module Main where
    main = putStrLn "hi"

    then start HIE, everything fine, no slowdown. Then I can add

    {#- LANGUAGE TemplateHaskell -#}
    module Main where
    main = putStrLn "hi"

    and the slowdown happens (4 minutes), after that everything works fine again, I can even remove template haskell again and readd it, no slowdown ever again in that HIE session.

    I can then restart HIE on that file, and the slowdown happens on startup again, because template haskell is present then.

  7. infinisil commented on Sep 3, 2018

    @infinisil
    Contributor

    With latest master, the problem isn't there (06de34e)

    Nope, still there

  8. added this to the Some time milestone on Dec 24, 2018
  9. infinisil commented on Apr 27, 2019

    @infinisil
    Contributor

    Aha! This is due to hie-nix doing static linking by default. I've now switched to my new https://github.com/infinisil/all-hies and will merge infinisil/all-hies#3 soon which fixes it.

  10. jneira commented on Jan 1, 2020

    @jneira
    Member

    Afaiu this one could be closed, feel free to reopen if it is not the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions