Skip to content

Locate performance regression for v4.5-414 #1468

@Zineb-Ada

Description

@Zineb-Ada

We ran this command line ocamlmerlin single locate -look-for ml -position 171:13 -filename src/irmin-pack/mem/irmin_pack_mem.ml < src/irmin-pack/mem/irmin_pack_mem.ml | jq. and we noticed a performance regression between the old and the new version of Merlin.
As you can see below, oddly the “cpu” of version v4.4-413 is faster than that of v4.5-414. We can see that this lag is especially due to the “query” field which has increased significantly.

Ocaml=4.14.0; Merlin= v4.5-414

{
  "class": "return",
  "value": {
    "file": "/Users/tarides/Desktop/Tarides-Ocaml/irmin/src/irmin/irmin.ml",
    "pos": {
      "line": 1,
      "col": 0
    }
  },
  "notifications": [],
  "timing": {
    "clock": 600,
    "cpu": 426,
    "query": 234,
    "pp": 0,
    "reader": 2,
    "ppx": 31,
    "typer": 160,
    "error": 0
  }
}

Ocaml=4.13.1 Merlin= v4.4-413

{
  "class": "return",
  "value": {
    "file": "/Users/tarides/Desktop/Tarides-Ocaml/irmin/src/irmin/irmin.ml",
    "pos": {
      "line": 1,
      "col": 0
    }
  },
  "notifications": [],
  "timing": {
    "clock": 189,
    "cpu": 166,
    "query": 32,
    "pp": 0,
    "reader": 4,
    "ppx": 15,
    "typer": 114,
    "error": 0
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions