Skip to content

Commit

Permalink
update performance note
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Feb 9, 2025
1 parent 1d2b67a commit 1c8729f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Also includes optimized implementations of:

headlong depends on gson v2.1 or greater at runtime and v2.11.0 or greater at compile time. Test suite should take less than one minute to run. Test packages require junit. Jar size is ~128 KiB. Java 8+.

For better JSON array parsing performance, use ABIJSON methods which accept a `Set<TypeEnum>` by which to filter objects by type. For best performance, json should be compact and "type" should be the first key in functions, events, and errors. This can be done via the method `ABIObject#toJson(boolean)` while supplying `false` as the argument (no pretty print).
For better contract ABI JSON parsing performance, consider ABIJSON methods which accept a `Set<TypeEnum>` by which to filter objects by type. For best performance, json should be compact and "type" should be the first key in functions, events, and errors. This can be done via `ABIJSON.optimizeJson(String)`.

See the wiki for more, such as packed encoding (and decoding) and RLP Object Notation: https://github.com/esaulpaugh/headlong/wiki

Expand Down

0 comments on commit 1c8729f

Please sign in to comment.