Skip to content

Commit

Permalink
only scan subfolders instead of all files to drastically reduce execu…
Browse files Browse the repository at this point in the history
…tion information perspective loading time. apache#2845
  • Loading branch information
bamaer committed Nov 18, 2023
1 parent fbb0eb4 commit 890cd97
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSelector;
import org.apache.commons.vfs2.FileType;
import org.apache.commons.vfs2.FileTypeSelector;
import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.gui.plugin.GuiElementType;
import org.apache.hop.core.gui.plugin.GuiPlugin;
Expand Down Expand Up @@ -354,7 +357,8 @@ public synchronized List<String> getExecutionIds(boolean includeChildren, int li
if (!folder.exists()) {
return Collections.emptyList();
}
for (FileObject child : folder.getChildren()) {
FileObject[] childFolders = folder.findFiles(new FileTypeSelector(FileType.FOLDER));
for (FileObject child : childFolders) {
if (child.isFolder()) {
subFolders.add(child);
}
Expand Down

0 comments on commit 890cd97

Please sign in to comment.