Closed sorawee closed 7 months ago
I think there's a way to group multiple suggestions into a single commit. Does this problem only occur if you keep the suggestions as separate commits?
Does this problem only occur if you keep the suggestions as separate commits?
I'm not sure what you mean by this.
When opening a PR, resyntax makes N suggestions. GitHub offers a way to batch all suggested changes in a review together into a single commit. If you do that, Resyntax won't display the quadratic behavior, correct?
GitHub offers a way to batch all suggested changes in a review together into a single commit.
I have no idea that this is a thing, and I still don't know how to use it.
It's the "Add suggestion to batch" button.
You have to go to the Files tab though, that's why it's greyed out here.
Ah, I see! Looks like this will solve my problem, then!
After opening a PR, Resyntax could make $n$ suggestions. Accepting the first suggestion re-runs Resyntax, generating $n-1$ suggestion. Accepting the second suggestion re-runs Resyntax, generating $n-2$ suggestion. And so on. Eventually, there are $O(n^2)$ comments in the GitHub PR, and most of them are identical to previously issued suggestions.
I understand the need to re-run Resyntax at every commit, because there could be more suggestions made available after accepting a suggestion. Still, the $O(n^2)$ problem is real and obviously undesirable.
A couple of possibilities to help with this problem: