+++ ファイラーを語ろう Part34 --- (355レス)
+++ ファイラーを語ろう Part34 --- http://egg.5ch.net/test/read.cgi/software/1738804202/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
339: 名無しさん@お腹いっぱい。 [sage] 2025/10/24(金) 12:46:36.76 ID:AzMFs/Wh0 >>323 > 相当する方法 と書いたけど実際にはNtQueryDirectoryFileを使ってます >>334 > ディスクI/Oがボトルネックになって頭打ちになるためメリットが少ない 場合によりますね PC起動後の初回などは確かにディスクIOが発生しますがその後はシステムキャッシュが効いて ディスクアクセスは殆ど無いようです >>336 NtCreateFileでローカルNTFSはFileId(reparse pointはskip)、それ以外は親ディレクトリハンドル+名前で開いてます >>338 FileIdを使いたいがために一度に沢山取得してます https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_id_full_dir_information PythonでNtQueryDirectoryFileを使う例 https://stackoverflow.com/questions/27439379/python-ntquerydirectoryfile-file-information-structure 自分はNT Native APIに不慣れな頃、Pythonで試してました http://egg.5ch.net/test/read.cgi/software/1738804202/339
340: 名無しさん@お腹いっぱい。 [sage] 2025/10/24(金) 13:24:38.16 ID:iyo/39nh0 >>339 C:\Windows\WinSxSを読ませた場合のプロファイラの結果 NtQueryDirectoryFileたしかにクソ速いですわ NtQueryDirectoryFile ============================== Profiling finished. Total execution time: 0.0009 seconds ============================== --- Top 25 functions by cumulative time --- 13 function calls in 0.001 seconds 自作のディレクトリスキャナー(マルチプラットフォーム) ============================= Profiling finished. Total execution time: 0.1438 seconds ============================== --- Top 25 functions by cumulative time --- 143800 function calls in 0.144 seconds http://egg.5ch.net/test/read.cgi/software/1738804202/340
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.750s*