Just having some fun here throwing out ideas that may or may not make sense.
Prevent UI lag
Can we switch from onDidSaveTextDocument -> onWillSaveTextDocument to set the modified time before the file is actually saved to prevent the UI issue you see where a file goes to the top and then goes back after being resorted by this extension?
Minimizing file changes:
Can we minimize the number of file time changes with some incremental updates?
On a "full refresh"
On .order change
- Assuming full refresh has already run, non-config files/folders are already sorted alphabetically and have modified times in the past, so just update the config files/folders, leaving the non-config files as is
On a file change
- Same as .order change but only look at files in the same directory as the file being changed
Just having some fun here throwing out ideas that may or may not make sense.
Prevent UI lag
Can we switch from onDidSaveTextDocument -> onWillSaveTextDocument to set the modified time before the file is actually saved to prevent the UI issue you see where a file goes to the top and then goes back after being resorted by this extension?
Minimizing file changes:
Can we minimize the number of file time changes with some incremental updates?
On a "full refresh"
On .order change
On a file change