Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1297

sys_core_alias gets (exponentially?) slow for deep trees with variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 23
    • Fix Version/s: None
    • Component/s: compiler
    • Labels:
      None

      Description

      Here is an example file that reproduces the issue:

       

      https://gist.github.com/josevalim/313b26a25ecf21bf28267b204bcaf04a

       

      It takes approximately 1.5s to compile on my machine. If I double the depth of the tree, it takes 6s. I doubled it again and I was not patient enough to wait for it to finish.

       

      I was the one who contributed sys_core_alias, so I apologized for the bug.  I assume the fix is to stop traversing the tree once we get to a certain depth but it has been a while since I touched this part of the code.

       

      Thank you!

        Attachments

          Activity

            People

            Assignee:
            john John Högberg
            Reporter:
            josevalim José Valim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: