Skip to content

Mutualize nodejs process/server #625

@tchernomax

Description

@tchernomax

Hello,

I use neovim a lot, and each time I run a new instance, with copilot.lua, it start a new nodejs instance.
This take A LOT of ram.

I manage to mitigate the problem by limiting all the copilot node process inside a systemd slice with 2G RAM limitation (so it doesn't crash my whole host).

copilot_node_command = {"systemd-run", "--user", "--slice=copilot-node.slice", "--scope", "--quiet", "node"},
# ~/.config/systemd/user/copilot-node.slice
[Slice]
CPUQuota=100%
MemoryMax=2G
MemorySwapMax=0
MemoryZSwapMax=0
OOMPolicy=continue

I don't know if it's possible, but I think it would be better if we could mutualize nodejs process, i.e. all neovim process would use the same nodejs process.

What do you think ?
Is it even possible ?

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions