Wininet Http latency difference between ActiveX in IE and same code in EXE RRS feed

  • Question

  • We have a 32 bit application packaged as an ActiveX for IE and also as an EXE. The difference between the ActiveX and EXE is the outer wrapper, all application internals are the same.

    We use wininet to communicate with IIS using an HTTPS TLS 1.2 connection. Specifically, we use these functions: HttpAddRequestHeaders, HttpSendRequestEx, InternetWriteFile, HttpEndRequest, HttpQueryInfo, InternetReadFile.

    The application incorporates a network performance test feature that sends and receives, 100 times, a payload (POST header, no-cache, Keep-Alive, binary body) of about 1,000 bytes. We call this our latency test. We noticed that for SOME users, their latency in the EXE (14, 15, 22) is less than half their latency in IE (39, 40, 49). Can you explain why? We want to know in the hope of possibly removing a bottleneck somewhere. The ActiveX and EXE hit the same server, so the difference must be on the client. The IIS Time-Taken for the ActiveX and EXE requests are equal.

    Included below are the Fiddler statistics for one round trip.

    Request Count:   1
    Bytes Sent:      1,014 (headers:274; body:740)
    Bytes Received:  1,074 (headers:334; body:740)

    ClientConnected: 12:33:47.348
    ClientBeginRequest: 12:33:47.661
    GotRequestHeaders: 12:33:47.661
    ClientDoneRequest: 12:33:47.661
    Determine Gateway: 0ms
    DNS Lookup: 0ms
    TCP/IP Connect: 0ms
    HTTPS Handshake: 0ms
    ServerConnected: 12:33:47.415
    FiddlerBeginRequest: 12:33:47.663
    ServerGotRequest: 12:33:47.664
    ServerBeginResponse: 12:33:47.737
    GotResponseHeaders: 12:33:47.737
    ServerDoneResponse: 12:33:47.737
    ClientBeginResponse: 12:33:47.737
    ClientDoneResponse: 12:33:47.738

    The selected session is a HTTP CONNECT Tunnel. This tunnel enables a client to send raw traffic (e.g. HTTPS-encrypted streams or WebSocket messages) through a HTTP Proxy Server (like Fiddler).

    Request Count:   1
    Bytes Sent:      170 (headers:170; body:0)
    Bytes Received:  107 (headers:107; body:0)

    ClientConnected: 12:33:47.348
    ClientBeginRequest: 12:33:47.348
    GotRequestHeaders: 12:33:47.348
    ClientDoneRequest: 12:33:47.348
    Determine Gateway: 0ms
    DNS Lookup: 0ms
    TCP/IP Connect: 65ms
    HTTPS Handshake: 232ms
    ServerConnected: 12:33:47.415
    FiddlerBeginRequest: 12:33:47.415
    ServerGotRequest: 12:33:47.415
    ServerBeginResponse: 00:00:00.000
    GotResponseHeaders: 00:00:00.000
    ServerDoneResponse: 00:00:00.000
    ClientBeginResponse: 12:33:47.415
    ClientDoneResponse: 12:33:47.415
    Wednesday, June 10, 2020 2:54 PM