I think we can optimize parsing the credential files by not reading the entire file into a byte slice and then decoding it, but just open an io.Reader with e.g. os.Open and then use json.NewDecoder or yaml.NewDecoder on it. That way the parser can start working while still reading the rest of the file and we save memory as the underlying byte buffer is way smaller than reading the entire file at once.