Skip to content

Large const map causes extreme v-analyzer performance degradationΒ #115

@einar-hjortdal

Description

@einar-hjortdal

Describe the bug

I have a ~1500 entry const map in one file, this causes v-analyzer to become extremely slow and crash often. It makes development very sluggish in vscode because its integration waits for v-analyzer at every save.

Expected Behavior

v-analyzer shouldn't be killed by a large map

Current Behavior

v-analyzer commits sudoku

Reproduction Steps

  1. Create a file such as this
  2. Watch v-analyzer sweat

Possible Solution

No response

Additional Information/Context

No response

Environment details (v doctor output)

V full version: V 0.4.7 c2f7afd.a4b8768
OS: linux, Linux version 5.14.0-427.26.1.el9_4.x86_64 (mockbuild@pp-el9) (gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), GNU ld version 2.35.2-43.el9) #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:28:16 CEST 2024
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz

getwd: /home/coachonko/Documents/projects/vlang/firebird
vexe: /home/coachonko/.local/lib64/v/v
vexe mtime: 2024-08-01 13:20:35

vroot: OK, value: /home/coachonko/.local/lib64/v
VMODULES: OK, value: /home/coachonko/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.43.5
Git vroot status: weekly.2024.31-25-ga4b87681
.git/config present: true

CC version: cc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
thirdparty/tcc status: thirdparty-linux-amd64 a0799a5b

Editor name

VSCode 1.91.1

v-analyzer Version

v-analyzer version 0.0.4-beta.1.7f80a04

VS Code Extension Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions