arthurintelligence / node-fs-filesystem

NodeJS Filesystem Utility
MIT License
19 stars 2 forks source link

macOS: Time Machine volumes are very slow to be reported #30

Open jacargentina opened 6 years ago

jacargentina commented 6 years ago

I 've found that when a time machine backup device is online, the call to filesystemSync is really really slow. May be the solution could be to avoid listing those devices, but then if somebody needs that info, there must be some way to invoke it.

@philippefutureboy any ideas?

philippefutureboy commented 6 years ago

Seems like a corner use-case; I suggest we opt for not listing the said device, and instead adding a boolean that says "hasUnlistedDevices" and add a note to the README for this use-case. If users actually need it at some point then we'll investigate some more.

Are you sure however that we can do such a thing as not listing it? And if so, have you checked if it actually increases performance?

And lastly, is this a use-case you'll be frequently encountering? If so we may as well implement a viable solution right now.

jacargentina commented 6 years ago

@philippefutureboy yeah, it is possible on macOS to call diskutil info list internal where internal avoids listing the said volumes

jacargentina commented 6 years ago

@philippefutureboy i was confused; for this to work we need to call discutió twice like this:

diskutil list internal

Then parse which mount points are listed and then call on each of them (/dev/xxx) like this:

diskutil info /dev/xxx

philippefutureboy commented 6 years ago

Great :) Do you plan on implementing the fix? If not, I'll look into it this weekend

jacargentina commented 6 years ago

Maybe i can look into this later