Performance
This version contains major performance improvements in the following functions:
Floki.filter_out/2.Floki.find/2- with some improvements to specific selectors, like classes
and attribute selectors.Floki.text/2.
Those functions are not only faster, but are now using less memory. Please check
the PRs related to this release if you want to better understand the numbers.
- Speed up
do_classes_matches?- #649 - Make
filter_outfaster - #650 - Speed up attribute lookup - #651
- Enable tuple traversal optimization for multiple selectors - #652
- Optimize
HTMLTree.to_tupleconversion usingEnum.reduce- #657 - Optimize
Finder.get_descendant_ids/2memory usage and speed - #660 - Optimize
Finder.get_siblings/2memory usage and speed - #663 - Optimize
FlatText.get/3memory usage and speed - #664 - Optimize class matching in
Floki.Selector- #665
All the improvements in this version were made by Barna Kovacs - @preciz,
so shout out and thanks to him!
Pull requests
- Fix build status badge by @sgerrand in #632
- Update v0.38.0 changelog item for breaking changes by @kianmeng in #634
- Bump earmark from 1.4.47 to 1.4.48 by @dependabot[bot] in #635
- Speed up do_classes_matches? by @preciz in #649
- Make filter_out faster by @preciz in #650
- Speed up attribute lookup by @preciz in #651
- Enable tuple traversal optimization for multiple selectors by @preciz in #652
- Optimize HTMLTree to_tuple conversion using Enum.reduce by @preciz in #657
- Optimize Finder.get_descendant_ids/2 memory usage and speed by @preciz in #660
- Fix unused require Logger warning in parser_test.exs by @preciz in #661
- Optimize Finder.get_siblings/2 memory usage and speed by @preciz in #663
- Optimize FlatText.get/3 memory usage and speed by @preciz in #664
- Optimize class matching in Floki.Selector by @preciz in #665
- Release v0.38.1 by @philss in #662
New Contributors
Full Changelog: v0.38.0...v0.38.1