Skip to content

Conversation

@cmaglie
Copy link

@cmaglie cmaglie commented May 4, 2022

The standard library encoding/json allows it by default.

Fix #237

The standard library `encoding/json` allows it by default.

Fix mailru#237
@cmaglie cmaglie force-pushed the case_insesitive branch from df38330 to 50149f4 Compare May 4, 2022 13:34
cmaglie added a commit to cmaglie/arduino-cli that referenced this pull request May 4, 2022
cmaglie added a commit to arduino/arduino-cli that referenced this pull request May 5, 2022
* Updated library_index.json for testing

* Use easyjson for parsing library_index

* Added benchmarks for json deconding.

Results:

$ go test -v -benchmem -bench BenchmarkIndexParsing github.com/arduino/arduino-cli/arduino/libraries/librariesindex
=== RUN   TestIndexer
--- PASS: TestIndexer (0.16s)
goos: linux
goarch: amd64
pkg: github.com/arduino/arduino-cli/arduino/libraries/librariesindex
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
BenchmarkIndexParsingStdJSON
BenchmarkIndexParsingStdJSON-8                 5         214872730 ns/op          94.52 MB/s    58956539 B/op     418973 allocs/op
BenchmarkIndexParsingEasyJSON
BenchmarkIndexParsingEasyJSON-8               16          69215472 ns/op         293.42 MB/s    56162664 B/op     418966 allocs/op
PASS
ok      github.com/arduino/arduino-cli/arduino/libraries/librariesindex 4.442s

easyjson is 3x faster.

* Updated license check cache

* Added easyjson to package_index.json parser

* Allow easyjson to match tags in case-insensitive

See mailru/easyjson#372

* Added easyjson generation task in Taskfile

* Added github action check

* Update .github/workflows/check-easyjson.yml

Co-authored-by: per1234 <[email protected]>

Co-authored-by: per1234 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can EasyJSON support case insensitive match

1 participant