zfm: faster dir listing

This commit is contained in:
minjaesong
2025-05-07 00:05:43 +09:00
parent dd6f1b5e7a
commit e3aa143c5b
3 changed files with 50 additions and 23 deletions

View File

@@ -68,7 +68,7 @@ abstract class BlockTransferInterface(val isMaster: Boolean, val isSlave: Boolea
blockSize.setRelease(bytesReceived)
writeoutImpl(inputData)
println("Contents: ${inputData.toString(VM.CHARSET)}")
// println("Contents: ${inputData.toString(VM.CHARSET)}")
applyBaudRateDelay(bytesReceived)
busy.setRelease(false)
@@ -127,7 +127,7 @@ abstract class BlockTransferInterface(val isMaster: Boolean, val isSlave: Boolea
val sleepTimeMS = (delayAkku / 1000000).toLong()
try {
Thread.sleep(sleepTimeMS)
println("Sleep $sleepTimeMS ms for $byteCount bytes")
// println("Sleep $sleepTimeMS ms for $byteCount bytes")
delayAkku -= sleepTimeMS * 1000000.0
}
catch (e: InterruptedException) {
@@ -135,7 +135,7 @@ abstract class BlockTransferInterface(val isMaster: Boolean, val isSlave: Boolea
}
}
else {
println("Sleep skip for $byteCount bytes")
// println("Sleep skip for $byteCount bytes")
}
// Update last transmission time

View File

@@ -289,6 +289,7 @@ class TestDiskDrive(private val vm: VM, private val driveNum: Int, theRootPath:
statusCode.set(STATE_CODE_NO_FILE_OPENED)
return
}
// println("[TestDiskDrive] file opened: ${file.path}")
try {
if (file.isDirectory) {
file.listFiles()!!.forEachIndexed { index, lsfile ->