platform_build_blueprint/pathtools
Colin Cross 098c09334f Remove unnecessary locking in fs
osFs.acquire and osFs.release are surprisingly expensive, using a
combined 345.7s of runtime in an AOSP aosp_cf_x86_64_phone-userdebug
build.  They are used to ensure we don't use too many simultaneous
open files, but many of the functions they are called from don't
actually open a file.  Remove them from all the stat-based functions
(Exists, IsDir, IsSymlink, Lstat, Stat), and from ReadLink.  After
this change the time spent in acquire and release is effectively
zero.

Test: SOONG_PROFILE_CPU=/tmp/cpu.pprof m nothing
Change-Id: Ie5e22e33c61794354821f05ab79ceb4efc3b276c
2023-10-31 20:24:35 +00:00
..
testdata Fix recursive globs through symlinks 2018-09-24 15:09:32 -07:00
fs.go Remove unnecessary locking in fs 2023-10-31 20:24:35 +00:00
fs_test.go Fix reading absolute paths through OsFs 2020-01-10 13:52:22 -08:00
glob.go Rename saneSplit --> quickSplit 2022-02-07 09:41:01 -05:00
glob_test.go Handle dangling symlinks when following symlinks 2021-10-08 17:50:17 -07:00
lists.go Fix ReplaceExtension 2021-02-16 21:45:01 -08:00
lists_test.go apply gofmt 2023-02-21 15:11:20 -05:00