jexia / semaphore

Take control of your data, connect with anything, and expose it anywhere through protocols such as HTTP, GraphQL, and gRPC.

Home Page:https://jexia.github.io/semaphore/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unnecessary header allocations

jeroenrinzema opened this issue · comments

Currently are the references header values not tracked inside the header manager. This causes that if a service is returning additional header values unnecessary memory allocations are made.

flow "greeter" {
  input "query" {
    header = ["Authorization"]
  }

  resource "io" {
    request "Say" "Hello" {
      header {
        Authorization = "{{ input.header:Authorization }}"
      }
    }
  }

  output "result" {
    header {
      Timestamp = "{{ io.header:Timestamp }}"
    }
  }
}

Header references should be tracked to avoid unnecessary allocations.
These values are stored inside the metadata manager which could be found here.