Skip to content

Commit c9c30be

Browse files
author
Edward Meng
committed
Replace GetFiles with EnumerateFiles method to improve peformance of FolderObjectStorage while retrieving object list.
1 parent bb583d8 commit c9c30be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Exceptionless/Storage/FolderObjectStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public IEnumerable<ObjectInfo> GetObjectList(string searchPattern = null, int? l
121121

122122
var list = new List<ObjectInfo>();
123123

124-
foreach (var path in Directory.GetFiles(Folder, searchPattern, SearchOption.AllDirectories)) {
124+
foreach (var path in Directory.EnumerateFiles(Folder, searchPattern, SearchOption.AllDirectories)) {
125125
var info = new System.IO.FileInfo(path);
126126
if (!info.Exists || info.CreationTime > maxCreatedDate)
127127
continue;

0 commit comments

Comments
 (0)