postmodern / chruby

Changes the current Ruby
MIT License
2.85k stars 190 forks source link

document why not having shims is good #433

Open grosser opened 4 years ago

grosser commented 4 years ago

I came here from https://github.com/rbenv/rbenv/issues/1223 :trollface:

peterb commented 4 years ago

❤️

postmodern commented 3 years ago

Decided to mention in 29af09c2642a7e8c4a894acaf84a3341c39623dd and 4f38caa621dc875533f345b3351ec80a52dd0a6e about when shims require constant regeneration, which is an annoying chore. I feel like rbenv could just optimize the shim regeneration or background the process and declare the problem solved.

eregon commented 3 years ago

Those commits don't mention the performance cost of shims though, so it seems a separate concern. :+1: for this PR.

peterb commented 3 years ago

Had another look at this and I've changed my mind.

@postmodern I think the time it takes for the shim to execute is dependent on the system architecture and might involve binaries? If I'm right, then it feels to me like this is something that would be better off treated as an add-on, maybe by providing a hook for plug-ins.

@eregon It would be nice to include some real-world figures in the docs, but surely that would have to mention the system specifications? The laws of nature and mathematics would tell us that a single number isn't statistically meaningful.