-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Labels
B-gridEverything grid and server relatedEverything grid and server relatedC-javaJava BindingsJava BindingsI-defectSomething is not working as intendedSomething is not working as intendedI-performanceSomething could be fasterSomething could be faster
Description
Description
Downloading of large files (approx. 500 Mb) from Selenium Grid Node is critically slow.
To reproduce you need to open browser at node and try to download an large file from server. In my case downloading of 500Mb from server to node takes approx. 10 seconds and uploading file from node to host - 250 seconds.
Potentially problem placed in the following code:
| public void downloadFile(String fileName, Path targetLocation) throws IOException { |
Response response = execute(DriverCommand.DOWNLOAD_FILE, Map.of("name", fileName));
String contents = ((Map<String, String>) response.getValue()).get("contents");
Zip.unzip(contents, targetLocation.toFile());
Encoding of 500Mb to Base64 takes a lot of time and born approx. X1.5 volume size (750Mb). Additionally, processing os large GSON also requires many processor resources and memory. Reverse encoding from Base64 to bytes also requires time.
The idea is to use raw bytes transferring without encoding.
Selenium 4.38
Reproducible Code
WebElement webElement = ...;
webElement.download();Debugging Logs
no
asolntsev
Metadata
Metadata
Assignees
Labels
B-gridEverything grid and server relatedEverything grid and server relatedC-javaJava BindingsJava BindingsI-defectSomething is not working as intendedSomething is not working as intendedI-performanceSomething could be fasterSomething could be faster