Hi Team, We are trying to use the new Classic API facade (i.e., HttpAsyncClients.classic) to download a 100 MB file from the internet and we are seeing it is taking more time (approximately 10x more time) to download than Async / Sync APIs (Multiple times ran the test and observed same results). Attached is the program we are using for testing. Is there any setting which we need to specifically perform in case of the new Classic API facade? *Note*: Time calculation includes API instance creation and downloading of file
sync4x - Classic Synchronous 4.5 APIs being used sync - Classic Synchronous 5.5 APIs being used async - ASynchronous 5.5 APIs being used syncasync - Classic API facade 5.5 APIs being used *Sample run results* C:\>java -jar FileDownloadTesting.jar sync4x downloadFileSync - Code execution took *27880 ms* for downloading https://mmatechnical.com/Download/Download-Test-File/(MMA)-100MB.zip C:\>java -jar FileDownloadTesting.jar sync downloadFileSync - Code execution took *22431 ms* for downloading https://mmatechnical.com/Download/Download-Test-File/(MMA)-100MB.zip C:\>java -jar FileDownloadTesting.jar syncasync downloadFileSyncAsync - Code execution took *316865 ms* for downloading https://mmatechnical.com/Download/Download-Test-File/(MMA)-100MB.zip C:\>java -jar FileDownloadTesting.jar async downloadFileASync - Code execution took *21446 ms* for downloading https://mmatechnical.com/Download/Download-Test-File/(MMA)-100MB.zip C:\>java -jar FileDownloadTesting.jar syncasync downloadFileSyncAsync - Code execution took *283624 ms* for downloading https://mmatechnical.com/Download/Download-Test-File/(MMA)-100MB.zip -- Cheers, S. Sreenivas
FileDownloadTesting.java
Description: application/ms-java
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
