Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It will cause huge heat on iOS #150

Open
qq1050603252 opened this issue Sep 18, 2023 · 2 comments
Open

It will cause huge heat on iOS #150

qq1050603252 opened this issue Sep 18, 2023 · 2 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@qq1050603252
Copy link

It will cause huge heat on iOS,when I watch a directory full of music.
Once the player plays the music in the watched directory, the device will generate huge heat.
(system: iOS 16.6)

@natebosch
Copy link
Member

I'm not sure if we have support for anything other than the polling watcher on iOS. I'd certainly expect a polling watcher on a very large directory to at least be keeping the CPU busier than it needs to be and have an impact on battery life.

I don't know if iOS supports file watching in Dart - what does isWatchSupported retur on that platform? https://api.dart.dev/stable/3.1.2/dart-io/FileSystemEntity/isWatchSupported.html

If iOS does support file watching, it would take a new implementation to use it. That could be a custom implementation outside the package and passed to registerCustomWatcher. https://pub.dev/documentation/watcher/latest/watcher/registerCustomWatcher.html

It's unlikely the Dart team will implement an iOS version. We could consider accepting a contributed implementation if the author has a plan for setting up testing on CI.

@natebosch natebosch added the type-enhancement A request for a change that isn't a bug label Sep 20, 2023
@natebosch
Copy link
Member

FWIW, as is I would not recommend using this package on iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants