September 26 - October 2, 2021 in Darker: Performance optimization and compatibility discussions #660
akaihola
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This week, we focused on addressing performance issues and exploring potential optimizations, particularly for large files and bisection scenarios. A significant discussion arose around the SequenceMatcher's suboptimal chunkification (#206), which can lead to unnecessarily large reformatting chunks. We considered various approaches, including adjusting junk heuristics and exploring alternative matching algorithms. One intriguing suggestion was to delegate diff computation to the
git
binary, which could potentially offer better performance and tuning for code.We also identified several areas for performance improvement in the bisection process (#205, #210, #211). These include moving loop-invariant code outside the bisection loop, optimizing AST verification, and caching intermediate comparison results. The community is actively discussing ways to implement these optimizations while maintaining compatibility with Black's API. Additionally, we addressed an issue related to Darker's behavior with all-whitespace files (#166), considering aligning it with potential changes in Black's public API.
On the compatibility front, we continued to work on the Visual Studio Code integration issue (#104), exploring ways to make Darker work seamlessly with the editor's format-on-save feature. This effort aims to improve the developer experience for VSCode users and bring Darker's functionality in line with other formatting tools.
Beta Was this translation helpful? Give feedback.
All reactions