Why output.AnswerBuffer can be slow?

Hi.
Here is code for testing, it just gets some instance frame and returns it:

def GetCachedDicomWeb(output, uri, **request):
    start = timer()

    raw = requests.get(f'http://localhost:8042/instances/eb746810-b670-4f69-a131-7c500222aac2/frames/{str(int(frame) - 1)}/raw')
    output.AnswerBuffer(raw.content, 'application/octet-stream')

    end = timer()
    print(timedelta(seconds=end-start))
    
orthanc.RegisterRestCallback('/cached-dicom-web/(.*)', GetCachedDicomWeb)

When i started Orthanc on my pc and called the endpoint above it executes within 0.1 seconds, which is very fast.

But i started Orthanc on another pc, which has the same CPU, SSD speed, internet speed, but has less RAM memory it executes within 3-4 seconds.

My RAM info:

H/W path            Device          Class          Description
==============================================================
/0/0                                memory         64KiB BIOS
/0/d                                memory         16GiB System Memory
/0/d/0                              memory         8GiB DIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0,4 ns)
/0/d/1                              memory         8GiB DIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0,4 ns)
/0/f                                memory         384KiB L1 cache
/0/10                               memory         3MiB L2 cache
/0/11                               memory         8MiB L3 cache

.

RAM info of another pc:

H/W path       Device      Class          Description
=====================================================
/0/0                       memory         64KiB BIOS
/0/11                      memory         8GiB System Memory
/0/11/0                    memory         [empty]
/0/11/1                    memory         8GiB DIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0,4 ns) 
/0/11/2                    memory         [empty]
/0/11/3                    memory         [empty]
/0/17                      memory         256KiB L1 cache
/0/18                      memory         1MiB L2 cache
/0/19                      memory         6MiB L3 cache
/0/100/1f.2                memory         Memory controller

Does AnswerBuffer writes data into ram memory before sending it? Is there other reasons?
Maybe the problem is the speed of RAM, not the size?