Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on optimization for non-windows #19677

Closed
5 tasks done
kunalspathak opened this issue May 19, 2023 · 3 comments · Fixed by #19701
Closed
5 tasks done

Turn on optimization for non-windows #19677

kunalspathak opened this issue May 19, 2023 · 3 comments · Fixed by #19701
Labels
Area-Maintainers-Build specific to affecting the build Resolution-Fixed The issue is fixed. Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers

Comments

@kunalspathak
Copy link

Prerequisites

Steps to reproduce

I noticed powershell sets Optimize=false on non-windows which might make it slow to execute on those OSs.

https://github.com/PowerShell/PowerShell/blob/master/PowerShell.Common.props#L189-L194

Can we see if the problem has resolved and turn optimize it back on?

Expected behavior

Optimize=true

Actual behavior

Optimize=false

Error details

No response

Environment data

non-windows

Visuals

No response

@kunalspathak kunalspathak added the Needs-Triage The issue is new and needs to be triaged by a work group. label May 19, 2023
@kilasuit kilasuit added Area-Maintainers-Build specific to affecting the build Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers labels May 19, 2023
@237dmitry
Copy link

I'am afraid of any "optimizations". Everything works quickly, faster than on Windows (maybe hardware). Slower than /usr/bin/bash (difference 0.0* for native utilities), but still fast for human perception. What is slower is shebang scripts.

@SeeminglyScience
Copy link
Collaborator

SeeminglyScience commented May 19, 2023

It's referring to compiler optimizations, which we absolutely should be enabling if at all possible. Reading the blame and involved threads it looks like we need to fix some interop code.

Kind of makes me wonder if there's a standard console utility folks on other platforms could use... disabling compiler optimizations for the entire code base (assuming I'm reading correctly and this isn't localized to some small assembly) strictly to make Set-Date work doesn't seem worth it. Seems like the interop issue was already fixed. Looking into it

@msftbot msftbot bot added the In-PR Indicates that a PR is out for the issue label May 23, 2023
@msftbot msftbot bot added Resolution-Fixed The issue is fixed. and removed In-PR Indicates that a PR is out for the issue Needs-Triage The issue is new and needs to be triaged by a work group. labels Jun 5, 2023
@msftbot
Copy link

msftbot bot commented Jun 29, 2023

🎉This issue was addressed in #19701, which has now been successfully released as v7.4.0-preview.4.🎉

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Maintainers-Build specific to affecting the build Resolution-Fixed The issue is fixed. Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants