CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

Improvements on workspace file loading

Open armartinez opened this issue 1 year ago • 5 comments

Description

Updated the way CEWorkspaceFileManager loads files into the project to increase speed, and relocated some file editing functions to an extension in preparation for further changes.

Related Issues

#1146

Checklist

  • [x] I read and understood the contributing guide as well as the code of conduct
  • [x] The issues this PR addresses are related to each other
  • [x] My changes generate no new warnings
  • [x] My code builds and runs on my machine
  • [x] My changes are all related to the related issue above
  • [x] I documented my code

armartinez avatar Jun 22 '23 11:06 armartinez

@Wouter01 I suspect your revamp of managing files in the workspace will also fix this problem? Rendering this implementation "useless".

matthijseikelenboom avatar Jun 22 '23 11:06 matthijseikelenboom

@armartinez thanks for this PR, it looks great, however, as @matthijseikelenboom mentioned, this might already be solved with @Wouter01’s PR. I wouldn’t go as far as to call this PR useless because there may be some things we may want to use. I’d recommend you two compare notes to see if anything in this PR is worth bringing in with @Wouter01’s changes.

@Wouter01 if you don’t plan to merge soon, you might assign yourself to any issues this solves and indicate which once it closes in your PR description if you haven’t already to avoid stepping on each others toes.

Thanks again @armartinez for your contribution and sorry for the confusion.

austincondiff avatar Jun 22 '23 13:06 austincondiff

@austincondiff @matthijseikelenboom I've taken a look at @Wouter01 PR and I had a similar implementation for building the tree but it collided with the file watcher, I don't know how far along he is with his implementation since his PR is a draft. This PR also doesn't fix the issue I mentioned yet, since adding files directly to the collection also caused problems with the file watcher. My plan was to first merge this changes and then work on changing the file watcher for file system events, which are more granular and will avoid having to rebuild the tree on every file change and will allow to modify files without waiting for the watcher.

armartinez avatar Jun 22 '23 13:06 armartinez

I think you should talk with @Wouter01 then. His implementation completely removes the use of a FileWatcher I believe.

matthijseikelenboom avatar Jun 22 '23 13:06 matthijseikelenboom

I haven’t had time to take a closer look at this PR, but it indeed seems to solve similar things. I did also revamp and split up the CEWorkspaceFile though. I’ll come back to this tomorrow

Wouter01 avatar Jun 22 '23 18:06 Wouter01