Search code examples
htmlportforwarding

Will network load time get increased during port forwarding?


Currently I am rendering images for live stream in html with port forwarding and it is taking around 324ms for 24.7KB. I checked the same html without image tag(which includes only a text display) and it is taking around 196ms for 252B. And I checked the code(with image tag) without port forwarding and it took around 15ms for 31KB.

Will there any difference in network speed with and without port forwarding to load a html file??
**Requirement:**Because I need to show instant image from a camera within 40-100ms in html page...
I checked the network speed as well,but no issues in that..

Screenshot for network tab with image tag ( with port forwarding),

enter image description here

Screenshot for network tab without image tag ( with port forwarding)

enter image description here

Screenshot for network tab with image tag (without port forwarding)

enter image description here


Solution

  • Port forwarding is a CPU and Memory intensive operation.

    Port forwarding does not add extra delay to network transfer.

    However, it makes the Operating system consume more memory and more CPU.

    Port forwarding process also takes higher priority than that of the browser running on the same computer.

    This will in turn stall the browser and make the browser spend more time waiting for its turn to use hardware resources.

    This problem manifests into 'Browser taking too long to download'.

    Options to fix the problem:

    1. Avoid Port forwarding as much as possible

    2. Install the latest service pack, if any, to improve port-forwarding performance

    3. Run the browser on a different computer other than the one on which port forwarding is configured

    4. Upgrade hardware to accommodate the overhead of port forwarding