Skip to content

c++ switch 语句太多的情况下会非常的卡顿 #1508

@CatkinYang

Description

@CatkinYang

Version confirmation

  • Confirm

Following prerequisites

  • Confirm

Not a user config issue

  • Confirm

Neovim version

nvim --version NVIM v0.11.3-dev Build type: RelWithDebInfo LuaJIT 2.1.1741730670 Run "nvim -V1 -v" for more info

Operating system/version

macOS 15.5

Terminal name/version

3.5.14

$TERM environment variable

No response

Branch info

main (Default/Latest)

Fetch Preferences

SSH (use_ssh = true)

How to reproduce the issue

    case Opcodes::LLOAD: {  // lload index
        u1 index = frame->code_[frame->pc_++];
        frame->OptNumStack.push(frame->getLocalVar(index));
        break;
    }
    case Opcodes::ALOAD: {  // aload index
        u1 index = frame->code_[frame->pc_++];
        frame->OptNumStack.push(frame->getLocalVar(index));
        break;
    }
    case Opcodes::LLOAD_0: {  // lload_0
        frame->OptNumStack.push(frame->getLocalVar(0));
        break;
    }
    case Opcodes::LLOAD_1: {  // lload_1
        frame->OptNumStack.push(frame->getLocalVar(1));
        break;
    }
    case Opcodes::LLOAD_2: {  // lload_2
        frame->OptNumStack.push(frame->getLocalVar(2));
        break;
    }
    case Opcodes::LLOAD_3: {  // lload_3
        frame->OptNumStack.push(frame->getLocalVar(3));
        break;
    }
    case Opcodes::ALOAD_2: {  // aload_2
        frame->OptNumStack.push(frame->getLocalVar(2));
        break;
    }
    case Opcodes::ALOAD_3: {  // aload_3
        frame->OptNumStack.push(frame->getLocalVar(3));
        break;

Expected behavior

不卡顿

Actual behavior

卡顿严重

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions