lost_soul 128 Posted July 8, 2014 Report Share Posted July 8, 2014 (edited) Consider the following. You have a mobile device with two physically separate disks. There's the internal NAND, and the SD card. When the device is powered on, it builds a database of all of the files on both of these drives so that files can be found quickly. Thing is though, it does this even if no changes have been made to the drives since the last power off, wasting loads of battery power and causing UI lag... and it does this at EVERY boot! Proposed solution: When the device is instructed to power off, it creates a file on the drive with a timestamp, and then immediately unmounts the file system. Then when you turn it on again, the device copies the last modification time of the file systems on the drives into memory. Then it actually mounts the file system and compares the date in memory to the timestamped file I mentioned above. If they are within a couple of seconds of each other, no external changes have been made to the drive and it is not necessary to rebuild the entire database from scratch. However, if they are out of sync, that indicates that somebody hooked the SD card to another machine, meaning the database needs rebuilt. Why is something this simple not implemented? I'm not even an engineer and stuff like this seems so logical. Edited July 8, 2014 by lost_soul 1 Quote --- War does not decide who is right, war decides who is left. Link to post Share on other sites
Goldwell 2477 Posted July 8, 2014 Report Share Posted July 8, 2014 Sometimes patents hold back engineering and backwards compatibility too. That seems to translate over to most of IT but especially with phones Quote Shadows of Northdale Campaign ACT I: A Curious Mind | ACT II: Down The Rabbit Hole Stand Alone Missions Snowed Inn | Accountant 1: Thieves and Heirs | Accountant 2: New In town | Spring Cleaning | Lord Edgar's Bathhouse Link to post Share on other sites
OrbWeaver 639 Posted July 8, 2014 Report Share Posted July 8, 2014 Why is something this simple not implemented? I'm not even an engineer and stuff like this seems so logical.The "simplest" solution is to scan the disks on every boot. Your solution is not simpler than this. It is more complex, requiring additional work to implement and (more importantly) test.Filesystems (especially ancient ones used in phones like FAT32) don't necessarily store a global "last modification time", and even when they do the software can't guarantee it is accurate. The SD card could have been modified on another system that doesn't correctly update the last modification time.If a problem isn't causing problems for most users than a company is not going to spend money solving it. I have never been particularly bothered by the few seconds of media scanning that happens when I (rarely) reboot my phone, and this is the first time I have ever heard anyone complain about it. Whenever you are tempted to wonder "why hasn't <company> fixed this already", this is most likely the reason. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to post Share on other sites
lost_soul 128 Posted July 8, 2014 Author Report Share Posted July 8, 2014 The thing is, when you have 70+ gigs of music, its not a matter of seconds of scanning... its a matter of minutes. The long scan will drain 4-6% of the battery. I would like to be able to justt leave the thing turned on, but I frequently find it dead within a couple days because some mis-behaving app has went rogue and sucked the life out of the battery. Quote --- War does not decide who is right, war decides who is left. Link to post Share on other sites
RJFerret 270 Posted July 8, 2014 Report Share Posted July 8, 2014 As others have explained, the answer comes down to "cost". However, there's a fallacy here. There's a cost to you, the inconvenience of turning the device on and having it already partially depleted and laggy. What is the cost to you of charging it before that inconvenience would occur? Isn't it zero since you'd have to charge it anyway? I SO hate to ask this because it might be taken as "not nice", but..."Why are simple solutions to problems so frequently overlooked?" ;-) So, you have several choices... One: If you have an Android, Firefox or open source Java phone, hire someone to make it work like you describe, or alternatively, have it do the scan at a lower priority or when the phone isn't actively being used by you, or not at all if you never use the search (like me with Windows, it's just turned off). That should only cost a few hundred or thousand dollars once. (If you have a closed source phone, replace it for an additional tens of dollars.) Two: Hire a physical personal assistant to regularly look at your phone to see if it needs charging, and plug it in for you. That should only cost tens of thousands of dollars annually. (No, I am not available to provide this service, sorry.) Three: Stop ignoring your low battery indications. $14.95 once. Four: Simply plug your phone in when you go to sleep. $14.95 once. You might wonder why options three and four aren't "Free!", the answer is they weren't apparent to you, such that you consulted here. My consulting rate for this type of thing is $60/hour, but since you are a "lost soul" and member of the TDM community, I've prorated this invoice and am billing you just a quarter hour instead of the customary one hour minimum. Please remit payment via Paypal to my username at yahoo, then enjoy never having to suffer lag while your phone indexes, plus enjoy 5% greater battery life! PS: If paying by credit card, please include the 4% processing fee, for a total of $15.55. 1 Quote "The measure of a man's character is what he would do if he knew he never would be found out."- Baron Thomas Babington Macauley Link to post Share on other sites
jaxa 259 Posted July 8, 2014 Report Share Posted July 8, 2014 The solution is Crossbar RRAM. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.