ZIm/crates/assistant
Antonio Scandurra 21f778c6db
Reduce memory footprint for inline transformations (#20296)
Closes https://github.com/zed-industries/zed/issues/18062

This pull request prevents the `scores` matrix for the streaming diff
from growing quadratically.

Previously, we would store rows and columns respectively for all
characters in the old and new text. However, every time we receive a
chunk, we will always advance the position in the matrix to the very
latest character in the new text. This means we can avoid storing scores
for the new characters that were already reported.

Randomized tests still pass and I also made sure that the diffs we
produce are identical.

Release Notes:

- Improved memory footprint for inline transformations
([#18062](https://github.com/zed-industries/zed/issues/18062))
2024-11-06 15:07:16 +01:00
..
src Reduce memory footprint for inline transformations (#20296) 2024-11-06 15:07:16 +01:00
Cargo.toml Restructure assistant edits to show all changes in a proposed-change editor (#18240) 2024-10-17 13:18:13 -04:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00