maestre3d / dynamoql-go

An ORM-like lightweight toolkit for Go applications interacting with Amazon DynamoDB.
https://pkg.go.dev/github.com/maestre3d/dynamoql-go
Apache License 2.0
1 stars 1 forks source link

Increment performance of the BuildExpression() function #2

Closed maestre3d closed 2 years ago

maestre3d commented 2 years ago

At this moment, the buildExpression() function is very large (potential code smell/bloat) and also it does not allocates the strings.Builder buffer capacity of the internal slice.

This affects testing (code smell) and also affects performance (unbuffered string.Builder).

How to

Separate in different small functions each case for LogicalOperators.

Calculate an approximate capacity for the strings.Builder internal buffer.

maestre3d commented 2 years ago

Done through this commit.