openGemini / opengemini-client-go

CNCF openGemini Go Client Library
https://opengemini.org/
Apache License 2.0
24 stars 17 forks source link

Pre-allocate memory for slices to prevent repeated reallocation and copy during capacity expansion #103

Closed dream-kzx closed 4 months ago

dream-kzx commented 4 months ago

https://github.com/openGemini/opengemini-client-go/blob/5898fcc3966deb7f364cf7eedbefcd6108c541fb/opengemini/retention_policy.go#L81-L129

variable: retentionPolicy

shoothzj commented 4 months ago

Although query retention policy isn't performance sensitive, but I think it can be optimized. #102 also reveals another problems of this class method. cc @cyruslo @Chenxulin97

dream-kzx commented 4 months ago

There are many other places with the same problem. I've only listed this one.

Chenxulin97 commented 4 months ago

There are many other places with the same problem. I've only listed this one.

It's not a problem , we will find the whole places and fix them . thanx for ur contribution.

dream-kzx commented 4 months ago

ok

shoothzj commented 4 months ago

@dream-kzx Let's keep this issue open util it's resolved :)

shoothzj commented 4 months ago

closed by #117