Skip to content

Releases: go-playground/form

Release 1.10.0

17 Jul 16:43
Compare
Choose a tag to compare

What's New?

  • Nothing just some more backend only performance updates.
benchmark                                                       old ns/op     new ns/op     delta
BenchmarkSimpleUserDecodeStruct-8                               308           298           -3.25%
BenchmarkSimpleUserDecodeStructParallel-8                       94.8          91.4          -3.59%
BenchmarkSimpleUserEncodeStruct-8                               989           966           -2.33%
BenchmarkSimpleUserEncodeStructParallel-8                       332           313           -5.72%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8             1004          1010          +0.60%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8     291           285           -2.06%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8             4771          4718          -1.11%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8     1575          1673          +6.22%
BenchmarkComplexArrayDecodeStructAllTypes-8                     17087         16145         -5.51%
BenchmarkComplexArrayDecodeStructAllTypesParallel-8             5020          4943          -1.53%
BenchmarkComplexArrayEncodeStructAllTypes-8                     16219         16020         -1.23%
BenchmarkComplexArrayEncodeStructAllTypesParallel-8             4961          5129          +3.39%
BenchmarkComplexMapDecodeStructAllTypes-8                       24898         22933         -7.89%
BenchmarkComplexMapDecodeStructAllTypesParallel-8               7771          6366          -18.08%
BenchmarkComplexMapEncodeStructAllTypes-8                       16885         16861         -0.14%
BenchmarkComplexMapEncodeStructAllTypesParallel-8               5851          5159          -11.83%
BenchmarkDecodeNestedStruct-8                                   3848          3482          -9.51%
BenchmarkDecodeNestedStructParallel-8                           1325          1011          -23.70%
BenchmarkEncodeNestedStruct-8                                   2319          2255          -2.76%
BenchmarkEncodeNestedStructParallel-8                           874           738           -15.56%

benchmark                                                       old allocs     new allocs     delta
BenchmarkSimpleUserDecodeStruct-8                               1              1              +0.00%
BenchmarkSimpleUserDecodeStructParallel-8                       1              1              +0.00%
BenchmarkSimpleUserEncodeStruct-8                               12             12             +0.00%
BenchmarkSimpleUserEncodeStructParallel-8                       12             12             +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8             1              1              +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8     1              1              +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8             47             47             +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8     47             47             +0.00%
BenchmarkComplexArrayDecodeStructAllTypes-8                     123            122            -0.81%
BenchmarkComplexArrayDecodeStructAllTypesParallel-8             123            122            -0.81%
BenchmarkComplexArrayEncodeStructAllTypes-8                     147            147            +0.00%
BenchmarkComplexArrayEncodeStructAllTypesParallel-8             147            147            +0.00%
BenchmarkComplexMapDecodeStructAllTypes-8                       135            131            -2.96%
BenchmarkComplexMapDecodeStructAllTypesParallel-8               135            131            -2.96%
BenchmarkComplexMapEncodeStructAllTypes-8                       176            176            +0.00%
BenchmarkComplexMapEncodeStructAllTypesParallel-8               176            176            +0.00%
BenchmarkDecodeNestedStruct-8                                   16             15             -6.25%
BenchmarkDecodeNestedStructParallel-8                           16             15             -6.25%
BenchmarkEncodeNestedStruct-8                                   17             17             +0.00%
BenchmarkEncodeNestedStructParallel-8                           17             17             +0.00%

benchmark                                                       old bytes     new bytes     delta
BenchmarkSimpleUserDecodeStruct-8                               64            64            +0.00%
BenchmarkSimpleUserDecodeStructParallel-8                       64            64            +0.00%
BenchmarkSimpleUserEncodeStruct-8                               549           549           +0.00%
BenchmarkSimpleUserEncodeStructParallel-8                       549           549           +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8             96            96            +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8     96            96            +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8             3073          3073          +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8     3073          3072          -0.03%
BenchmarkComplexArrayDecodeStructAllTypes-8                     2513          2289          -8.91%
BenchmarkComplexArrayDecodeStructAllTypesParallel-8             2518          2291          -9.02%
BenchmarkComplexArrayEncodeStructAllTypes-8                     7350          7351          +0.01%
BenchmarkComplexArrayEncodeStructAllTypesParallel-8             7351          7351          +0.00%
BenchmarkComplexMapDecodeStructAllTypes-8                       7088          5338          -24.69%
BenchmarkComplexMapDecodeStructAllTypesParallel-8               7121          5341          -25.00%
BenchmarkComplexMapEncodeStructAllTypes-8                       7159          7161          +0.03%
BenchmarkComplexMapEncodeStructAllTypesParallel-8               7161          7160          -0.01%
BenchmarkDecodeNestedStruct-8                                   640           416           -35.00%
BenchmarkDecodeNestedStructParallel-8                           640           416           -35.00%
BenchmarkEncodeNestedStruct-8                                   768           768           +0.00%
BenchmarkEncodeNestedStructParallel-8                           768           768           +0.00%

Release 1.9.0

09 Jul 15:22
Compare
Choose a tag to compare

Whats New?

  • Just some more minor backend performance updates inspired by Go 1.7 RC1 changes to the JSON package, parallel performance updated by 10-20% with latest changes.

benchmark                                                       old ns/op     new ns/op     delta
BenchmarkSimpleUserDecodeStruct-8                               319           308           -3.45%
BenchmarkSimpleUserDecodeStructParallel-8                       116           94.8          -18.28%
BenchmarkSimpleUserEncodeStruct-8                               1015          989           -2.56%
BenchmarkSimpleUserEncodeStructParallel-8                       411           332           -19.22%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8             1038          1004          -3.28%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8     368           291           -20.92%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8             5014          4771          -4.85%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8     1973          1575          -20.17%
BenchmarkComplexArrayDecodeStructAllTypes-8                     17656         17087         -3.22%
BenchmarkComplexArrayDecodeStructAllTypesParallel-8             5801          5020          -13.46%
BenchmarkComplexArrayEncodeStructAllTypes-8                     16318         16219         -0.61%
BenchmarkComplexArrayEncodeStructAllTypesParallel-8             5955          4961          -16.69%
BenchmarkComplexMapDecodeStructAllTypes-8                       25196         24898         -1.18%
BenchmarkComplexMapDecodeStructAllTypesParallel-8               9443          7771          -17.71%
BenchmarkComplexMapEncodeStructAllTypes-8                       17061         16885         -1.03%
BenchmarkComplexMapEncodeStructAllTypesParallel-8               6375          5851          -8.22%
BenchmarkDecodeNestedStruct-8                                   4102          3848          -6.19%
BenchmarkDecodeNestedStructParallel-8                           1399          1325          -5.29%
BenchmarkEncodeNestedStruct-8                                   2440          2319          -4.96%
BenchmarkEncodeNestedStructParallel-8                           1045          874           -16.36%

benchmark                                                       old allocs     new allocs     delta
BenchmarkSimpleUserDecodeStruct-8                               1              1              +0.00%
BenchmarkSimpleUserDecodeStructParallel-8                       1              1              +0.00%
BenchmarkSimpleUserEncodeStruct-8                               12             12             +0.00%
BenchmarkSimpleUserEncodeStructParallel-8                       12             12             +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8             1              1              +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8     1              1              +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8             47             47             +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8     47             47             +0.00%
BenchmarkComplexArrayDecodeStructAllTypes-8                     123            123            +0.00%
BenchmarkComplexArrayDecodeStructAllTypesParallel-8             123            123            +0.00%
BenchmarkComplexArrayEncodeStructAllTypes-8                     147            147            +0.00%
BenchmarkComplexArrayEncodeStructAllTypesParallel-8             147            147            +0.00%
BenchmarkComplexMapDecodeStructAllTypes-8                       135            135            +0.00%
BenchmarkComplexMapDecodeStructAllTypesParallel-8               135            135            +0.00%
BenchmarkComplexMapEncodeStructAllTypes-8                       176            176            +0.00%
BenchmarkComplexMapEncodeStructAllTypesParallel-8               176            176            +0.00%
BenchmarkDecodeNestedStruct-8                                   16             16             +0.00%
BenchmarkDecodeNestedStructParallel-8                           16             16             +0.00%
BenchmarkEncodeNestedStruct-8                                   17             17             +0.00%
BenchmarkEncodeNestedStructParallel-8                           17             17             +0.00%

benchmark                                                       old bytes     new bytes     delta
BenchmarkSimpleUserDecodeStruct-8                               64            64            +0.00%
BenchmarkSimpleUserDecodeStructParallel-8                       64            64            +0.00%
BenchmarkSimpleUserEncodeStruct-8                               549           549           +0.00%
BenchmarkSimpleUserEncodeStructParallel-8                       549           549           +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8             96            96            +0.00%
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8     96            96            +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8             3073          3073          +0.00%
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8     3072          3073          +0.03%
BenchmarkComplexArrayDecodeStructAllTypes-8                     2515          2513          -0.08%
BenchmarkComplexArrayDecodeStructAllTypesParallel-8             2518          2518          +0.00%
BenchmarkComplexArrayEncodeStructAllTypes-8                     7351          7350          -0.01%
BenchmarkComplexArrayEncodeStructAllTypesParallel-8             7351          7351          +0.00%
BenchmarkComplexMapDecodeStructAllTypes-8                       7089          7088          -0.01%
BenchmarkComplexMapDecodeStructAllTypesParallel-8               7123          7121          -0.03%
BenchmarkComplexMapEncodeStructAllTypes-8                       7162          7159          -0.04%
BenchmarkComplexMapEncodeStructAllTypesParallel-8               7160          7161          +0.01%
BenchmarkDecodeNestedStruct-8                                   640           640           +0.00%
BenchmarkDecodeNestedStructParallel-8                           640           640           +0.00%
BenchmarkEncodeNestedStruct-8                                   768           768           +0.00%
BenchmarkEncodeNestedStructParallel-8                           768           768           +0.00%

Release 1.8.0

03 Jul 19:52
Compare
Choose a tag to compare

What Changed?

  • backend only changes, no breaking changes.
  • fine tuned a few more internals for max performance and decreasing allocations, library is now balanced between primitive and complex struct decoding and encoding with least allocations for both.
  • squashed a potential bug with calculated slice length, upgrading to latest version is recommended

Release 1.7.1

29 Jun 14:08
Compare
Choose a tag to compare

What Changed?

  • Corrected issue where time pointer, *time.Time, was not getting set on the struct field when using built in time parsing. corrected in commit 762ce96, adding this line was the fix.

Thanks @bikbah for reporting!

Release 1.7.0

29 Jun 03:22
Compare
Choose a tag to compare

What's New

Nothing anyone needs to worry about, all backend changes.

  • Minor performance updates, reduced allocations for maps and arrays.
  • Updated Benchmarks

Release 1.6.0

23 Jun 01:14
Compare
Choose a tag to compare

What Changed?

  • Nothing just added ajg/form benchmarks as a comparison was requested.

Release 1.5.0

21 Jun 14:13
Compare
Choose a tag to compare

What's New?

  • Added Array/Slice global limit size, please refer to #2, reported by @justinas

by default limit is 10,000 which should suit most peoples needs however if a higher or lower limit is desired/required it can be adjusted with the function SetMaxArraySize(size uint)

Release 1.4.0

21 Jun 03:37
Compare
Choose a tag to compare

What's New?

Added Encoder to go along with the Decoder.

example

Notes

To maximize compatibility with other systems the Encoder attempts
to avoid using array indexes in url.Values if at all possible.

eg.

// A struct field of
Field []string{"1", "2", "3"}

// will be output a url.Value as
"Field": []string{"1", "2", "3"}

and not
"Field[0]": []string{"1"}
"Field[1]": []string{"2"}
"Field[2]": []string{"3"}

// however there are times where it is unavoidable, like with pointers
i := int(1)
Field []*string{nil, nil, &i}

// to avoid index 1 and 2 must use index
"Field[2]": []string{"1"}

Release 1.3.0

16 Jun 08:25
Compare
Choose a tag to compare

What's New?

  • Added usage of DecodeCustomTypeFunc within map keys so custom types will also apply to map keys.

Release 1.2.1

14 Jun 02:31
Compare
Choose a tag to compare

What Changed?

  • fixed bug in array struct assignment, fixed in commit d77a15c thanks @falun