This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 890cd97c60 only scan subfolders instead of all files to drastically
reduce execution information perspective loading time. #2845
new 04a9783a0e Merge pull request #3418 from bamaer/master
890cd97c60 is described below
commit 890cd97c60013fa093dc3114882131628a2c381b
Author: Bart Maertens <[email protected]>
AuthorDate: Sat Nov 18 05:37:48 2023 +0100
only scan subfolders instead of all files to drastically reduce execution
information perspective loading time. #2845
---
.../org/apache/hop/execution/local/FileExecutionInfoLocation.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/engine/src/main/java/org/apache/hop/execution/local/FileExecutionInfoLocation.java
b/engine/src/main/java/org/apache/hop/execution/local/FileExecutionInfoLocation.java
index 479c44702a..15c7d6b244 100644
---
a/engine/src/main/java/org/apache/hop/execution/local/FileExecutionInfoLocation.java
+++
b/engine/src/main/java/org/apache/hop/execution/local/FileExecutionInfoLocation.java
@@ -31,6 +31,9 @@ import java.util.Date;
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;
@@ -354,7 +357,8 @@ public class FileExecutionInfoLocation implements
IExecutionInfoLocation {
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);
}