Every time a property is updated, the setD function is triggered to parse the path string, which incurs unnecessary overhead. Before calling setD(), it is advisable to first check if the path string has been updated.
Additionally, BuildFromSvgString() also parses the string, meaning the path string is parsed twice in total, resulting in unnecessary performance degradation. This modification ensures that parsing the path string and obtaining the path object are done simultaneously within setD(), eliminating the need to call BuildFromSvgString().
Summary
Closed #263
Every time a property is updated, the setD function is triggered to parse the path string, which incurs unnecessary overhead. Before calling setD(), it is advisable to first check if the path string has been updated.
Additionally, BuildFromSvgString() also parses the string, meaning the path string is parsed twice in total, resulting in unnecessary performance degradation. This modification ensures that parsing the path string and obtaining the path object are done simultaneously within setD(), eliminating the need to call BuildFromSvgString().
Test Plan
All SvgPath related section in SvgDemoCase.
Checklist