Not 100% a coding question, more around developer productivity.
I work in Data Science, meaning a lot of my day is spent reading some data, manipulating it, making some charts, training some models, evaluating them, etc...
I'm proud to say the code we are using is very optimized (files are saved in parquet, all manipulations are vectorized and distributed over as many cores as possible, things are memmapped where it would help, regularly used files are cached locally - etc...)
However, there are still dozens of "4min-6min" moments per day where there is nothing to do (the machine is just loading the data from disk, or calculating something...). Sometimes it feels like working with internet connection from the 90's - very hard to stay in flow.
4min is not enough to go do something else without losing one's train of thought, but it is far too long to sit there waiting for the execution to run.
Note:
- This is mainly around ad-hoc analysis and prototyping; we do have scheduled code that runs every day to have all very-slow-running code pre-run before we start the day.
- I've profiled the code, and most of it can't be made any faster.
Any guidance or working patterns you are aware to deal with this?