Hacker News new | ask | show | jobs
by jaen 21 days ago
Wait what? Most plugin systems do NOT use process isolation as the performance overhead is horrible.

Usually it's either safety-via-language (Lua, JS etc.) or just YOLO (dynamically linked libraries), at best lightweight isolation like WebAssembly but that's modern projects, <1%.

The process isolation approach is only widely used for Go (Kubernetes, Terraform), because Go doesn't support DLLs (nicely)... (and the systems themselves are very slow anyway)

2 comments

Think about all the applications that spawn a subprocess and enable you to override the executable by configuration or just the PATH.

Those are plugin systems too, unless your term 'plugin' requires dynamically loaded code libraries by definition.

By that definition almost everything is a plugin system, which makes the discussion kind of pointless.

Also note the word most in the original comment...

Common plugin system use cases are eg.: 1. Game mods. 2. Browser extensions / content scripts.

Re-iterating: Neither of those are – in general – compatible for the out-of-process approach due to performance problems.

Language Server Protocol uses a separate process and the performance is not horrible
LSP has a very complex protocol to make it seem the performance is not horrible. An in-process one would be quite a bit simpler and faster.

Also it is perceptibly slow if you've ever used fast editors, but that's not entirely due to the plugin protocol design.