dashR icon indicating copy to clipboard operation
dashR copied to clipboard

Dash for R should not recursively index files outside of assets, except by request

Open rpkyle opened this issue 5 years ago • 1 comments

With @kozo2's help, we have identified unwanted indexing behaviour in Dash for R which may slow down app execution if an application directory contains many files/folders.

We should refactor indexing so that

  • Dash for R does not (unnecessarily) attempt to build a list of modification times for all files within an app directory
  • We try to limit collection of modification times to sessions where hot reloading is enabled
  • We restrict the recursion to assets and its subfolders, as well as (optionally) any user specified directories
  • We present an error when hot reloading is enabled and more than 100 files are indexed within the app directory, but allow overrides by manually declaring search paths within the app folder

@alexcjohnson @Marc-Andre-Rivet

rpkyle avatar Mar 02 '20 21:03 rpkyle

This sounds good to me, if I'm understanding it correctly - when hot reloading is on, you watch:

  • all the files within the app directory itself non-recursively
  • all files in the assets directory recursively
  • optionally any files in user-specified subdirectories of the app directory recursively

Right? The one thing I might add is there should be a way to get back to exactly the current behavior without enumerating all subdirectories, like putting '.' or '*' in the user-specified directory list.

alexcjohnson avatar Mar 02 '20 22:03 alexcjohnson