Skip to content

Commit 80bd769

Browse files
fryanpanclaude
andcommitted
ADFA-4128: name resDirs among the layout's disk reads
Akash on #1719: the class KDoc exists to tell a caller which members are expensive, and it left out resDirs(), whose isDirectory filter stats the disk. A caller reading "the path accessors are arithmetic and cost nothing" would have counted resDirs() among them. It stats rather than walks, so it is cheaper than the three already named; the sentence says that rather than lumping it in with them. Comment only. No behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XN91S41dghWHoXAoWhJAnm
1 parent f384c20 commit 80bd769

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎quickbuild/core/src/main/java/org/appdevforall/cotg/quickbuild/data/QuickBuildProjectLayout.kt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import java.io.File
1212
*
1313
* Not all of it is arithmetic: [allSources], [watchedRoots] and [watchedFiles] walk the tree
1414
* (the latter two through the module scan), so they are disk reads and belong off the main
15-
* thread. The path accessors are arithmetic and cost nothing.
15+
* thread. [resDirs] only stats rather than walks, but that is still a disk read. The remaining
16+
* path accessors are arithmetic and cost nothing.
1617
*
1718
* @property projectRoot the user project's root directory, which the watched gradle config
1819
* files and the module scan hang off.

0 commit comments

Comments
 (0)