Open mySebbe opened 3 years ago
First of all, scanning takes some time as well. On a new round, a typical concern is (was?) to locally prepare&start for the new round ASAP. When you have multiple sources, scanning takes even more. If you have NTFS and a tons of files and ntfs-optimisation is turned on, it takes even even more more. And so on.
Second, if plotting takes place in parallel, this means that the drive is being used by another process. Plotting means writing quite a lot of data to the drive. Online, or in batches, but still. This means that any reading operations on that drive may get a serious performance hit, especially if that's a classic mechanical drive with heads.
Third, scanning isn't a very intelligent thing. It's all about drives, directories, and filenames. If plotting is generating files into one of the source directories, then most probably some of the files there are incomplete. The mining software will now know which one are ready and which ones are not, and will try to read from them as well. Now, things may happen. It may crash into a file lock (someone's writing), it may read trash data (space was allocated but not written yet), etc. While it is possible to protect the miner against file locks, then the reading trash data is less safe. Miner will calculate wrong DLs and will sent them to the pool as usuall, and the pool may penalize the miner for sending errorneous data.
Then.. which round? if you mine 2 or 3 coins in parallel, which round of those triggers the event? Any round from any coin? or just the now-mined one? or now mined or any with higher prio? uuh. I didn't want to analyze it now so I'll stop.
So, surely not ON by default IMHO. It would have to be seriously measured by a few users, and only then I could agree with default:true if it turns out to be negligble.
The feature itself at first sounds relatively easy to implement, as it seems that most of the things are already done and it's just a matter of different choreography of tasks.
However, Blago isn't prepared for it at all. The code isn't as clean and modular as I/we/etc would like, and adding this feature would currently mean spaghettizing the code here and there even more than it is now..
Last year I was trying to refactor the code, globally, to make whole core more 'pipelined' so source/round/coin switching is more flexible, and also to make adding such features easier. I failed to finish it though and none of that hit the GIT here. I did some work and had to postpone it for unknown time. I just had 2 weeks of vacation from job and it turned out to be zero time for hobby coding..
For that reason, I'm against adding this at this time. The benefit seems very little. Running plotting and mining at the same time on the same files risks performance and stability problems. And code's not really ready for grant reordering of tasks.
Since Plotting take a Long time and you can already start ming with the files that are ready it would be nice to have a option to scan every round for new plots
scanPathsEveryRound - optional 'true' will check 'plotPaths' for changed plot files on every round (default:true) 'false' will check only on start/restart