Repository navigation
normalizeSlashes should probably no-op on *nix #44174
Copy link
Copy link
Closed
Labels
Domain: PerformanceReports of unusually slow behaviorReports of unusually slow behaviorNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
Activity
dmichon-msft commented
on May 19, 2021 ContributorMore actionsIt would probably be best practice to warn or even error if any paths provided in config files or source code contain back slashes, with a note that they will have different behavior depending on OS.
MartinJohns commented
on May 19, 2021 ContributorMore actionsDavid Michon (@dmichon-msft) Related to that statement: #44053
- addedNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
on May 27, 2021 - addedDomain: PerformanceReports of unusually slow behaviorReports of unusually slow behavior
on Feb 1, 2022 - addedRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
on Feb 1, 2023 I tried this out in #53173 and I didn't see much of a difference; perhaps we've optimized it enough that this turns out to not be a problem anymore. But, I might be lacking a test case where this is really bad.
- removedRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
on May 4, 2023
Metadata
Metadata
Assignees
Labels
Domain: PerformanceReports of unusually slow behaviorReports of unusually slow behaviorNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
As David Michon (@dmichon-msft) pointed out, Linux file names can contain backslashes, so indiscriminately converting them into forward slashes is probably a bad idea. Redefining
normalizeSlashesas the identity function on non-Windows platforms would also be a perf win, since it's very hot code. The biggest concern is that someone might be depending on this (e.g. I think you can use backslashes in paths in tsconfig.json).