File tree Expand file tree Collapse file tree
src/MediaConverters/MediaConverters.Lib/Imaging/Optimizations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public static async Task<ImageFileOptimizationResult> OptimizeImageFileAsync(Ima
3939
4040 context . LogMessage ( $ "Start optimize image file. File='{ imageFile } '") ;
4141
42+ // Check imageFile Exists Cost 179ms. Total Cost 184ms
4243 if ( ! File . Exists ( imageFile . FullName ) )
4344 {
4445 // 不能依靠 imageFile.Exists 属性,因为属性可能还没更新
@@ -49,7 +50,15 @@ public static async Task<ImageFileOptimizationResult> OptimizeImageFileAsync(Ima
4950 } ;
5051 }
5152
53+ stopwatch . Stop ( ) ;
54+ context . LogMessage ( $ "Check imageFile Exists Cost { stopwatch . ElapsedMilliseconds } ms.") ;
55+ stopwatch . Restart ( ) ;
56+
57+
5258 Directory . CreateDirectory ( workingFolder . FullName ) ;
59+ stopwatch . Stop ( ) ;
60+ context . LogMessage ( $ "CreateDirectory workingFolder Cost { stopwatch . ElapsedMilliseconds } ms.") ;
61+ stopwatch . Restart ( ) ;
5362
5463 if ( copyNewFile )
5564 {
You can’t perform that action at this time.
0 commit comments