Skip to content

Commit d8149b9

Browse files
authored
Merge pull request #161 from edwardmeng/master
Replace GetFiles with EnumerateFiles method to improve peformance in FolderObjectStorage
2 parents bb583d8 + c9c30be commit d8149b9

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)