robpike / ivy

ivy, an APL-like calculator
Other
1.32k stars 103 forks source link

improve ivy usage in scripts #127

Closed wgrr closed 1 year ago

wgrr commented 1 year ago

recent changes made in ivy made it always write cpu profiles in /tmp, even in my system tmp being a ramfs, i noticed a substantial slowdown in some scripts i have using ivy, i did what most things in go ecosystem do which is turn off by default and enable it with a flag, while doing this i also merge an old change i made to stop printing an extra new line when reading stdin from pipes, this saves an extra | sed i had to use to remove them, but the only annoying piece is the slowdown to exit ivy, i'm ok if you just cherry-pick this change.

BR.

robpike commented 1 year ago

My apologies. This was put in for debugging a couple of years ago and should have been removed. Please don't add the flag, just delete the automatic creation of a profile.

Thanks for catching this.

robpike commented 1 year ago

I added a flag to enable profiling when desired.

89f602241fc4ff63b840681788d9eabbb4354eaf