# HTTP file request ULTRA SLOW in Unreal. why?

**URL:** <https://forums.unrealengine.com/t/http-file-request-ultra-slow-in-unreal-why/2346723>\
**Category:** Blueprint\
**Tags:** unreal-engine, editor, CPP, Blueprint, question\
**Created:** [February 20, 2025, 3:03pm UTC](https://forums.unrealengine.com/t/http-file-request-ultra-slow-in-unreal-why/2346723 "2025-02-20T15:03:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [February 20, 2025, 3:03pm UTC](https://forums.unrealengine.com/t/http-file-request-ultra-slow-in-unreal-why/2346723/1 "2025-02-20T15:03:10Z")

</div>

Hi there! I am working on some implementation to download files via HTTP and is working super slow (at least ten times slower than a simple curl request from a terminal

here is the code of my functions

```auto
UDownloadFileAsync* UDownloadFileAsync::DownloadFileAsync(FString HttpAddress, FString FileName, FString DestinationFolder, FString AuthToken)
{
    UDownloadFileAsync* Node = NewObject<UDownloadFileAsync>();
    Node->StartDownload(HttpAddress, FileName, DestinationFolder, AuthToken);
    return Node;
}

void UDownloadFileAsync::StartDownload(FString HttpAddress, FString FileName, FString DestinationFolder, FString AuthToken)
{
    if (!HttpAddress.EndsWith(FileName))
    {
        HttpAddress += "/";
        HttpAddress += FileName;
    }
    
    if (FPaths::IsRelative(DestinationFolder))
    {
        DestinationFolder = FPaths::ConvertRelativePathToFull(FPaths::ProjectDir() / DestinationFolder);
    }

    FString FilePath = FPaths::Combine(DestinationFolder, FileName);
    
    if (!FPlatformFileManager::Get().GetPlatformFile().DirectoryExists(*DestinationFolder))
    {
        FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*DestinationFolder);
    }
    
    TSharedRef<IHttpRequest, ESPMode::ThreadSafe> HttpRequest = FHttpModule::Get().CreateRequest();
    HttpRequest->SetURL(HttpAddress);
    HttpRequest->SetVerb("GET");

    if (!AuthToken.IsEmpty())
    {
        HttpRequest->SetHeader("Authorization", "Bearer " + AuthToken);
    }
    
    TWeakObjectPtr<UDownloadFileAsync> WeakThis(this);

    HttpRequest->OnProcessRequestComplete().BindLambda([WeakThis, FilePath](FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
    {
        if (!WeakThis.IsValid()) return;

        bool Success = false;

        if (bWasSuccessful && Response.IsValid())
        {
            const TArray<uint8>& FileData = Response->GetContent();
            if (FileData.Num() > 0)
            {
                Success = FFileHelper::SaveArrayToFile(FileData, *FilePath);
            }
        }

        if (WeakThis.IsValid())
        {
            WeakThis->OnComplete.Broadcast(Success);
        }
    });

    HttpRequest->ProcessRequest();
}

```

here is the terminal tesst code I do:

```auto
curl -o Char01.zip -H "Authorization: Bearer XXXX" "http://mySite.whatever.net:8000/files/Char01.zip"

```

does anyone has any clue why a 50mb file from a terminal takes like 400ms and in unreal takes like 5000 or 6000? its just a 50mb file and the test I am running is local (server in a gigabit network)

Thanks!

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [February 20, 2025, 4:02pm UTC](https://forums.unrealengine.com/t/http-file-request-ultra-slow-in-unreal-why/2346723/2 "2025-02-20T16:02:42Z")

</div>

A thread from @Rama of 2016 helped me!!!  
He had the same problem 9 years ago  
Incredible

anyway…here is the final solution for me:

> [@\[HTTP\] Why is HTTP GET so slow, UE4 is performing 15x slower than Python at downloading a file](https://forums.unrealengine.com/t/http-why-is-http-get-so-slow-ue4-is-performing-15x-slower-than-python-at-downloading-a-file/364768/13):
>
> This is already marked as resolved question, but I want to share I discovered. I found that HTTP request’s fetch rate is controlled by FHttpModule, especially HttpThreadActiveFrameTimeInSeconds variable is the key. Default value of it is around 0.005(200Hz). That means, tiny fetch operations were called just 200 times per second. By decreasing the value to the proper value I could get reasonable download speed. You can control this value from the Engine configuration file like this: [HTTP] Htt…

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 22, 2025, 4:02pm UTC](https://forums.unrealengine.com/t/http-file-request-ultra-slow-in-unreal-why/2346723/3 "2025-03-22T16:02:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
