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

Typer very high when we run occurrences or locate commands #1492

Open
Zineb-Ada opened this issue Jun 28, 2022 · 2 comments
Open

Typer very high when we run occurrences or locate commands #1492

Zineb-Ada opened this issue Jun 28, 2022 · 2 comments

Comments

@Zineb-Ada
Copy link

Zineb-Ada commented Jun 28, 2022

We ran ocamlmerlin occurrences and locate commands and we noticed that the typer is abnormally high whereas when we ran type-enclosing command on the same position we can notice that the typer is significantly much lower.
As you can see with the three examples below :

Occurrences command : ocamlmerlin single occurrences -identifier-at 49:8 -filename ./src/irmin-mirage/git/irmin_mirage_git.ml < ./src/irmin-mirage/git/irmin_mirage_git.ml | jq .

{
  "class": "return",
  "value": [
    {
      "start": {
        "line": 49,
        "col": 7
      },
      "end": {
        "line": 49,
        "col": 10
      }
    },
    {
      "start": {
        "line": 347,
        "col": 17
      },
      "end": {
        "line": 347,
        "col": 20
      }
    }
  ],
  "notifications": [],
  "timing": {
    "clock": 2099,
    "cpu": 2075,
    "query": 5,
    "pp": 0,
    "reader": 3,
    "ppx": 0,
    "typer": 2066,
    "error": 0
  }
} 

Locate command : ocamlmerlin single locate -look-for ml -position 49:8 -filename ./src/irmin-mirage/git/irmin_mirage_git.ml < ./src/irmin-mirage/git/irmin_mirage_git.ml | jq .

{
  "class": "return",
  "value": "Already at definition point",
  "notifications": [],
  "timing": {
    "clock": 2200,
    "cpu": 2138,
    "query": 2,
    "pp": 0,
    "reader": 3,
    "ppx": 0,
    "typer": 2133,
    "error": 0
  }
}

type-enclosing command : ocamlmerlin single type-enclosing -position 49:8 -verbosity 0 \ < ./src/irmin-mirage/git/irmin_mirage_git.ml | jq

{
  "class": "return",
  "value": [
    {
      "start": {
        "line": 49,
        "col": 7
      },
      "end": {
        "line": 49,
        "col": 10
      },
      "type": "sig end",
      "tail": "no"
    },
    {
      "start": {
        "line": 49,
        "col": 0
      },
      "end": {
        "line": 61,
        "col": 3
      },
      "type": "sig end",
      "tail": "no"
    }
  ],
  "notifications": [],
  "timing": {
    "clock": 10,
    "cpu": 10,
    "query": 1,
    "pp": 0,
    "reader": 3,
    "ppx": 0,
    "typer": 5,
    "error": 0
  }
}

@art-w

@ulugbekna
Copy link
Contributor

ulugbekna commented Jul 1, 2022

“Typer is abnormally high” 😁

(sorry for noise)

@voodoos
Copy link
Collaborator

voodoos commented Sep 26, 2023

I just tried Merlin 4.11-501 on some Irmin file and it's still very slow. Although not the typing...

ocamllabs/vscode-ocaml-platform#954 (comment)

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

3 participants