crossplane / crossplane/upjet

[Performance] Unnecessary conversions from []byte to map to []byte to struct while populating status.atProvider

Open
#185 0 comments 0 reactions 0 assignees View on GitHub
codegen enhancement is:triaged v2
Dominant language
Go
Stars
481
Forks
131
Avg merge
2d 1h
Merged PRs (30d)
11

Description

### What problem are you facing?

In `controller.external.Observe` & `controller.external.Update`, looks like we are first converting a `jsoniter.RawMessage` (`[]byte`) first to `map[string]any` and then from `map[string]any` back to `[]byte`, and then from `[]byte` to `Status.AtProvider` struct.

### How could Upjet help solve your problem?

The extra marshaling/unmarshaling costs us CPU. Let's take a look if this is really necessary. Can we shorten the conversion path to `[]byte` -> `Status.AtProvider`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.