Skip to content

feat: Use Keep-Alive connection to connect to server

Stan Hu requested to merge sh-reuse-https-connections into main

Description

This MR introduces a change to use Keep-Alive connection to connect to the server. This will improve the performance of the application by reducing the number of TCP connections that need to be established.

This ports gitlab-org/editor-extensions/gitlab-lsp!137 (merged) to the VSCode extension.

This MR also introduces a common IFetch interface that is implemented for both browser and desktop versions. The desktop version uses an HTTP agent with TCP keepalives enabled. This required refactoring tests to inject dependencies to handle different implementations of a URL fetcher.

Much of this code was lifted from the Language Server and simplified to drop support of proxy servers.

Related Issues

Resolves #[issue_number]

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Stan Hu

Merge request reports

Loading