You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the current implementation, passing file_lines is slow because it needs to parse the whole file and create an entire AST even though it only needs to format the specific lines. What's worse, it could be slower than formatting the whole file because it needs to check whether each line is within the given file lines parameter.
If we could be certain that the part of a file is a complete AST (e.g. formatting a group of imports), we could directly call format_snippet or format_code_block rather than full format_input.
Just collecting ideas at this point. Some time around the 1.0 launch we should start prioritising and move discussion to the rustfmt repo.
cc @topecongiro
The text was updated successfully, but these errors were encountered: