Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add file tree exclude in core #12417

Closed
ficristo opened this issue May 13, 2016 · 5 comments
Closed

Add file tree exclude in core #12417

ficristo opened this issue May 13, 2016 · 5 comments

Comments

@ficristo
Copy link
Collaborator

ficristo commented May 13, 2016

Right now every time an user has a performance issue one of the first things is to ask to install an extension so to exclude some files from the watchers.
It would be nice to have it in the core, to reduce these issues.
It would be help my PR #12190 because then I could read to exclude list from the configuration.
Plus all of these extensions seems to mess with a private method _indexFilter which could results in some problems in the future.

There are some extensions but I was mostly think to this one:
https://github.com/zaggino/brackets-file-tree-exclude
/cc @zaggino

@zaggino
Copy link
Contributor

zaggino commented May 13, 2016

Fine with me, but there should be some sort of icon/indicator that there were some entries hidden from the file tree and the user would be taken to the filter settings when he clicks that icon.

@ficristo
Copy link
Collaborator Author

Mmm totally my fault to not try the extensions before...
What I'm personally really interested is the configuration for the purpose of the PR #12190.
Now I'm not sure if I really want all the features of those extensions...

@petetnt
Copy link
Collaborator

petetnt commented May 13, 2016

Check out my enhancement proposal called black-box in #11833 (comment) which is basically File Tree Exclude + @zaggino's suggestion for UI interactions.

edit: I'll just add it here:

I was thinking something along the lines:

  • Create a list of common suspects to black-box. This list would include things such as:
    • node_modules
    • bower_components
    • tmp-folders (or temp, or similar)
    • maybe lib/ and vendor/ too.

node_modules is the most important as by design they contain tons of files

  • These black-boxed files, which mostly would be external libraries and temporary files, would contains following attributes:
    • They are not being watched for changes by default (filtered away during FileSystem.prototype._watchEntry?
    • They are marked as black-boxed in the folder tree (somehow. how?)
    • Maybe not included in searches either
  • black-boxed files can be browsed, opened and modified normally
    • If a black-boxed file is modified, it gains the following attributes
      • It's added to the watched files (/roots)
      • It's added to the searches
    • These additional files could either be: saved until session ends (Brackets is closed) or to ´state.json` and persisted forever.
    • They right clicking an black-boxed file (tree) would offer an option to remote the file (tree) from the blackbox
  • Vice versa any folder/file could be black-boxed by right clicking the file (tree)
    • This could either be session long, or persisted by brackets.json
  • The list of common suspects could be found and extended in preferences.json

Benefits

  • (HUGE) performance benefits (possibly?)
  • Ability to browse and modify file structures that cause performance issues within Brackets as they wouldn't have to be excluded in the FileTree anymore

Risks

  • Just an concept, could need quite a lot work to perform correctly
  • Might create some confusion about some files not being watched / searched
    • Can be avoided with proper introduction to the feature

@asthomasdk
Copy link

This would indeed be good to have built in. We have huge performance issues with new environments on our default projects - until we install https://github.com/zaggino/brackets-file-tree-exclude - after which they go away.

@ficristo
Copy link
Collaborator Author

I much prefer the approach in #12647, so closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants