Why does media scanning take so long on our phones? - Captivate Q&A, Help & Troubleshooting

Or is it just my phone?
I originally thought it was just an Android thing; A minor inconvenience that I could get used too. After helping my brother flash his Droid X and seeing how fast it completes it's scan I have to ask, what makes our phones slower?

the problem is with the file system that samsung used for our phones, you need to install a kernel where it converts it from the rfs system they used to an optimized ext 4, most of the roms come with this feature or you could just use supercrucio's kernel (Voodoo) which works best for me

whirly said:
the problem is with the file system that samsung used for our phones, you need to install a kernel where it converts it from the rfs system they used to an optimized ext 4, most of the roms come with this feature or you could just use supercrucio's kernel (Voodoo) which works best for me
Click to expand...
Click to collapse
I should have mentioned that I almost always run a lagfix.
Maybe the Droid X is just that much faster with reads, and the Captivate isn't slow.

If you have root, you can d/l rescan media root and control all that nonsense.
Sent from my SAMSUNG-SGH-I897 using XDA App

Media scan is still horrid even under custom ROMs.
Admittedly I thought it was due to the large amount of data on the slow external SDCard I have (16gig).
I want to find something where I can just disable it and run it manually whenever I want it to update.

Found an app called Rescan Media and tried it for giggles.
"Disabled" using the application - and I have to say my phone rebooted seemingly much faster - Widgets loaded and ready to use faster then I've ever had to wait before.
The media scanner will still load on boot - but doesn't re-scan your entire cards during the bootup process. And if you hit the app it will cause the Media scanner to read your cards which doesn't take very long at all since your phone is already up and booted.
Have to use it for awhile and see if it screws anything up - but I think this app is a keeper!

avgjoegeek said:
Media scan is still horrid even under custom ROMs.
Admittedly I thought it was due to the large amount of data on the slow external SDCard I have (16gig).
I want to find something where I can just disable it and run it manually whenever I want it to update.
Click to expand...
Click to collapse
See the post above yours. I tried that solution a couple weeks ago and didn't really like it, but others seemed to. (edit: just saw your previous post)
It probably wouldn't be such a nuisance if it wasn't the first freaking thing it did after reboot. Media scanning should run after other startup items... like obtaining signal, loading widgets, launcher, etc.
Or even better, have it run only when you launch the music player or gallery. I'm not sure why we would need it any other time. Or even betterest, let us set up specific folders for media so we don't need the scanner at all.

Yup I agree - Samsung strikes again at being lazy just doing a blind scan at boot up.
Since all the processes are trying to startup at the same time of the scan - it's causing the perceived lag as they are both fighting each other (for lack of a better term) for resources and I/O and takes forever for them to figure it out.
It would be nice if a Dev could create a 3rd party app that takes control of the Media Scanner - then gives us the options of only scanning certain folders and have it scheduled to run like you mentions - i.e. when <x> app loads, or after you unplug your USB, or just run it manually.
The app I posted isn't that elegant a solution but it does seem to work. My bootup time is cut in half (This is from Power Up to Usable UI Interface with Widgets loaded.).
Just nice to have considering I STILL (i.e. will never) haven't gone to AT&T to exchange my phone due to the shutdown issues I've been having. At least it's not the up to 3 minutes!! I used to have to wait for me to be able to use the phone again.
LOL.. but coming from an Apple iPhone 3G I was used to it.

it truthfully is slow... i have a sd card for more memory so it takes about twice as long than the normal.. im running darky port 8.0 with voodoo but dont see a difference..

Put a file in your folders named ".nomedia" (without quotes) that contain things like rom zips, backups, etc and media scanner will stop spending time sifting through them searching for music and photos
edit....this will also eliminate unwanted images from showing up in the gallery if you have icons or png's that you use for other purposes

Related

Is Android supposed to be stable?

Maybe im expecting too much:
When I press gallery, almost 1/3 of the time only 1 or 2 categories come up and no thumbnails. Then i exit and press again and a few more things show up. Then i exit again and usually the 3rd time or so the app opens properly.
Also, about once every 2 weeks i press an app and it opens a different app. And this happens with multiple apps. The only way to fix it is to reboot.
I dont use a task manager
I reboot the phone every couple of days
I wipe the phone about once every 1 or 2 months
Is one of the above practices ruining my device?
I bought the phone and i havent done anything custom to it. Why does my polished 2.1 firmware work like a 5th grade science experiment?
Have occasionally noticed that the gallery app does not pick up all images and categories... something with the media scanner... try using the media scanner in the dev tools app or unmount and remount ur sd card...
Never had any problems with apps opening wrong apps... this is very strange... I have no idea why this is happening and quite frankly, I can;t think of anything which would serve as a possible solution!
Occasionally I've had the latest picture taken not show up in the gallery, but that's it. Stock O/S is great.
Never had it open the wrong app.
I don't run a task killer, don't reboot & have never wiped.
About the app opening the wrong app thing I guess its good news if I'm the only one. Is it possible that I've downloaded an app that is causing it? Or is it more likely an OS issue? it seems a little cheesy that the phone does this, if I could fix it without rebooting that would be a step in the right direction...
Likely an app you downloaded, or just something a little off about the flashing of your update, or a bad RAM memory block at the wrong place.
As for the gallery, I thought I had that issue a bit too, but I noticed that more than anything it just takes a really long time to open fully if it has been kicked out of the cache.
As for the original question posed in the thread title, Android is still Beta in a lot of ways. 2.0/1 is a huge change in many ways from 1.6. It sounds like 2.2 is going to be a bit of a change as well, but instead of changing nearly everything, it is going to build of 2.0/1 plus add in some changes. I am willing to bet that until the release after Gingerbread (the OS after 2.2, aka FroYo), not sure what the "H" release will be codenamed will we see an OS that isn't "Beta" in enough ways for me to call it non-Beta personally... then again, so far Android is less buggy than windows mobile, better than Blackberry even, and on par with iPhone OS, if not better in these regards.
Just like an OS for a computer, same holds true for a smartphone, there are going to be bugs, there are going to be bad programs/apps, and so forth.
I think you should wait for FroYo, if Android still doesn't meet your standards, root and flash some of the custom ROMs. Enom is very stock like, but fixes many of the little bugs, as does Cyan, although with Cyan you do get a few more bugs in some of the development apps and what not.
Just a thought, but maybe you're suffering from the occasional wacky touchscreen issue?
So it's not that it's just opening the wrong app, but the screen is registering a touch in a different place, it's usually most noticable when typing. If it is that, then a simple lock/unlock will solve it, no need for a reboot.

[Q] Apps kept coming back after autokill -> memory leak -> lag

Hi all,
1. I've got these applications (Smartone-Vodophone SV app, 5 days weather, google map, social hub and such) that would keep coming back, relaunching themselves even after I put them onto my task manager's autokill list. Seems like they would wait around for me to enable the wifi/3G connection and then launch themselves. I even installed other apps to disable autolaunch and they would still launch themselves in the background every now and then. I had to kill them every time I unlocked my screen and these "launching and killing" cycles eventually depleted my memory down to below 100MB, making the lag situation even worse. Does anyone know how I can stop them from launching, without having to uninstall these apps?
2. I haven't installed the lagfix and I understand that the fix has to do with reformatting the apps' partition with a faster file system to reduce the lag (probably by giving it faster I/O access to the program's binaries?) I'm still waiting for Froyo, which should be out in a couple of weeks in my country. Does anyone know if Froyo would take care of this file system problem? Even with the Froyo or one-click lag fix, it still would not solve the apps launching and memory leak problem, right?
3. I notice that after I've installed more apps, the lag situation got worse. I was playing some songs on the external SD cards and it choked once in a while. I made sure I killed all the other apps and that I still got 100+MB to run just this one song player app and yet it would still choke. This tells me that the lag has nothing to do with available memory. And the player app was stock that came with the phone so there shouldn't be any fragmentation issue (apps installed later might have?) that makes it run slow. And if its the bad file system, this app, running all by itself, should have all the I/O bandwidth to itself so the access to the app's binaries should not have any lag... and neither should the access to the songs on the external SD card. So what exactly is causing the lag then? I don't see how the lagfix would solve this problem either. I actually have read that the lags would come back after a period of usage even with the lagfix. Anyone got an insight to this problem? What exactly is causing the lag? and why installing more apps seem to make it worse? and would Froyo be able to fix all these problems?
Thanks a lot.
@boarder838
I think you really need to read a lot more about just how Android works as you seem to have some strange ideas about how it works.
To start with you need to realise that having 200mb or 100mb of free Ram makes zero difference to performance only when you have no free Ram is it a problem and even then the system will sort it out for you by closing the least used program. Free Ram is just wasted Ram as it's not doing anything and will not make your device respond or work faster using a Auto Task Killer is wasting your battery and slowing down your device not speeding it up and saving battery as you seem to think. As i have pointed out above stop obsessing over your free Ram amount as unless you have none its not a problem stop using a Task Killer and you will most probably see your device responds faster as its not constantly killing things and just leaves them open doing nothing in the back ground which doesn't use Ram or Battery so just leave them be.
Yes Froyo will bring many improvements to our devices but won't fix a problem that doesn't exist re memory leaks and apps launching that you seem to think you have. I don't know but some of those apps may be system apps that need to run all the time which is why they keep relaunching. As for a lag fix well that's what we are all hoping for but if not I'm pretty sure the great people of this forum will come up with an easy to apply fix to it.
I have absolutely no problem playing Music or even streaming it over Bluetooth no lag stutters or break ups at all although my Music is on the Internal SD card. Maybe you should look at the quality that you have encoded your Music in as that may be causing problem. maybe some of the apps you have installed are also causing a problem but its impossible to know as we all install different apps and have different set ups.
I don't know how much experience you have with Android devices or flashing Roms but if you read enough and understand it you have the possibility to flash custom Rom's and various tweaks and fixes to make your device how you want it. That's part of the beauty of Android but don't rush into anything you are not sure about as you can end up with an expensive brick so read things many times and make sure you understand step by step what you are doing if you are going to attempt any of these things.
If you look at my signature you will see i am running a Custom Rom that includes a lag fix and various other tweaks it also allowed me to remove some of the programs in the official Rom that i didn't want or need. For me my device runs nice and smooth and fast of course I'm looking forward to Froyo and all the improvements that will bring but I'm quite happy with my Galaxy S the way it is now. Oh and this is my second Android device and I've never used a Task Killer never mind an Auto Task Killer and have never seen an out of Ram message either.
Marc
exactly what he said ^
Hi Marc,
Thanks for spending time to read through my long post and reply to it. I probably didn't explain my problem clearly in my post.
There were a couple of reasons I wanted to kill/stop the apps from starting:
1. Even before I installed any of those apps killer, I noticed that the available memory kept going down after a couple days of usage and it went down to below 100M. I figured some of the apps would need 10's of MB to run so I thought I should at least keep 100MB around so that it wouldn't run out of memory and start swapping when I start those apps. I don't know enough about Android but I assume its just like linux or other OS, when it runs out of physical memory, it would start swapping and slow things down. Even after I started using task killer and killed all the other tasks, the memory level would still not recover. That seems to point to a memory leak problem but using "Memory Booster" to do garbage collection seems to help. Still, it would be nice to be able to stop them from launching in the first place. <-- my first question.
2. I do not want any jobs/processes/apps that I don't need to run in the background to drain my battery. I don't think I can say for sure that those apps are all just idling and not using much CPU/battery. There are quite a few of them so if each of them use some CPU time/battery, it will add up eventually. Note that these are not system processes (or daemons as in unix's init.d). They are crappy apps from the cellular provider so I'm pretty sure they don't have to be running (they're probably just collecting my personal data or smth). I just thought there would be a way to stop them from launching without uninstalling them.
Thanks for answering my question regarding Froyo. If they would do the filesystem lagfix then I'll just wait for that update.
As for the music stuttering problem, my songs are on the external SD card but my old Nokia E85 phone has no problem playing with those songs on the same SD card. As I have pointed out in my last question, I was only running one app and with plenty of memory so it had nothing to do with available memory. I also suggested that however bad the filesystem was, the I/O bandwidth should still be enough to run this one music player app (access the program binary/libraries?) and to retrieve data from external SD card to play the music smoothly. So applying the lagfix probably won't help this problem though I still haven't tried the lagfix. Now I'm thinking that one of the task killer might be killing some system processes which were needed by the music player. I probably should uninstall all these task killers and see if it would help.
I have gotten the phone for only a couple of weeks so I haven't gotten around to try flashing different roms or rooting my phone. There's so much info scattered around on the web and I can't seem to find a source that really has the authority or complete information. I'll see if I have time later to look into all the tweaks and such but for now its just a phone to me and I just want it to run smoothly without having to spend too much effort to tune it.
Don't get me wrong. I still love the flexibility and customization opportunities provided by the Android platform and I just love to show off my "Beautiful Weather Widget", "Live Aquarium Wall Paper" and my cool 3D scrolling "Launcher Pro" to my iphone4 buddies and make them drool.
Thanks for you comment and let's hope Froyo will bring us a smooth running and stable platform.
Dogmann said:
@boarder838
I think you really need to read a lot more about just how Android works as you seem to have some strange ideas about how it works.
To start with you need to realise that having 200mb or 100mb of free Ram makes zero difference to performance only when you have no free Ram is it a problem and even then the system will sort it out for you by closing the least used program. Free Ram is just wasted Ram as it's not doing anything and will not make your device respond or work faster using a Auto Task Killer is wasting your battery and slowing down your device not speeding it up and saving battery as you seem to think. As i have pointed out above stop obsessing over your free Ram amount as unless you have none its not a problem stop using a Task Killer and you will most probably see your device responds faster as its not constantly killing things and just leaves them open doing nothing in the back ground which doesn't use Ram or Battery so just leave them be.
Yes Froyo will bring many improvements to our devices but won't fix a problem that doesn't exist re memory leaks and apps launching that you seem to think you have. I don't know but some of those apps may be system apps that need to run all the time which is why they keep relaunching. As for a lag fix well that's what we are all hoping for but if not I'm pretty sure the great people of this forum will come up with an easy to apply fix to it.
I have absolutely no problem playing Music or even streaming it over Bluetooth no lag stutters or break ups at all although my Music is on the Internal SD card. Maybe you should look at the quality that you have encoded your Music in as that may be causing problem. maybe some of the apps you have installed are also causing a problem but its impossible to know as we all install different apps and have different set ups.
I don't know how much experience you have with Android devices or flashing Roms but if you read enough and understand it you have the possibility to flash custom Rom's and various tweaks and fixes to make your device how you want it. That's part of the beauty of Android but don't rush into anything you are not sure about as you can end up with an expensive brick so read things many times and make sure you understand step by step what you are doing if you are going to attempt any of these things.
If you look at my signature you will see i am running a Custom Rom that includes a lag fix and various other tweaks it also allowed me to remove some of the programs in the official Rom that i didn't want or need. For me my device runs nice and smooth and fast of course I'm looking forward to Froyo and all the improvements that will bring but I'm quite happy with my Galaxy S the way it is now. Oh and this is my second Android device and I've never used a Task Killer never mind an Auto Task Killer and have never seen an out of Ram message either.
Marc
Click to expand...
Click to collapse
Oh I found the problem with stuttering music. It was the "beautiful weather widget"! I tried removing all the task killers and aquarium etc and it still wouldn't work. As soon as I removed the weather widget there was no problem with music playback anymore. Anyone has the same problem that pretty weather widget?? I've already set the refresh period to every 3 hours but it still wouldn't help?!

[Q]Delay media scanning on boot?

is there a way to delay the scanning on boot by a set amount of time?
i know it can be disabled but can it be delayed? or maybe moved to the last thing it does on boot up?
30 - 60 seconds would be nice. let the phone do less at a time...
Have you looked at the startup managers in market? I thought I saw one that would delay certain processes. Also, if you post request in the SGS Tools thread (thebes and apps), wilson may be able to add something like that to the app.
Sent from a place my wife doesn't know about (yet)
ill look into that thanks but i would prefer to not have another thing run on startup
Have you tried something like SD Maid to (hopefully help) speed up boot? May not help, but just a random thought.
yup. also deleted a bunch of un-needed icons. and a few un explainable scripts in the init.d folder. bit better but not much
Is it possible to select what starts up, kinda like selective start up on your (windows) pc?

[Q] Couple of days in - a couple of Qs...

So after some great help by gregbradley and others, I have a rooted T and now have an OTA 195 update.
However I have a couple of questions (apart from my continued quest to find a way to get the phone to save camera output in less compressed fashion.
1) Is it usual for mediaserver to be the 2nd great drain on battery after the screen and ahead of android system?
(there appear to be many web discussions on this, but I could not find a definitive answer. Mine has always been like this even before I tinkered with it, or before I put the sim in (I didn't put the sim in until after I had rooted and updated. I do not have an SD card in there yet (64Gb on order) and I have not added any new pics or movies to the stock provided ones.
2) Can you change where apps are installed? Can this be changed for Google Play apps (like xda) Is the default to install to "phone memory" rather than "internal storage". Given that "phone memory" is only ~ 2Gb, it would be good to install to "internal storage"
3) Are apps on the home screens (eg Walkman) always running, even when not in use (the walkman example is the app 4x1 icons wide and has basic controls on it)?
Many thanks as always!
icstm
some clarification I should have added yesterday...
1) quite simply I would be keen to know what type of apps call on the mediaserver process
2) I know that from the "apps" in settings" some apps can be moved, but that appears limited and no default can be set
3) when I say apps, I mean widgets and the like, not the simply shortcut icons
icstm said:
some clarification I should have added yesterday...
1) quite simply I would be keen to know what type of apps call on the mediaserver process
2) I know that from the "apps" in settings" some apps can be moved, but that appears limited and no default can be set
3) when I say apps, I mean widgets and the like, not the simply shortcut icons
Click to expand...
Click to collapse
1) Anything that needs to scan the sdcards for contents will call on the media server. After a fresh flash many apps will be collating their cache so the mediaserver may have a high battery drain, you should never worry about battery drain untill you have run a ROm for at least 3-4 days to let it settle
2) Yes, use apps such as link2sd or app2sd, free in the market. However I have not yet felt the need to do this with a 16gb internal memory
3) Thos e widgets are just shortcuts, e.g. I have a weather app set to refresh every 2 hours...it will be woring in the background whether or not the homescreen widget is on the homescreen or not.
However, do not worry about task killers, since android 2.1 the best task killer is the one that comes with the OS. The only other exception is if you install init.d scripts and supercharge scripts etc, but you may want to leave that for a bit and get used to the phone first.
So I am on the xda app, much better way to view the site than mobile browser .
However, I cannot see what you wrote when I reply.
But it relates to your last point on making customisations. And not just keyboard which prefers US spellings over UK ones .
I am thinking of tinkering with the OS files as I am very upset with the compression of photos. So I am keen by what you say just below number 3.
Sent from my LT30p using xda app-developers app
AW: [Q] Couple of days in - a couple of Qs...
Change your keyboard or even better your whole phone to UK in language and keyboard setting and it'll propose BE instead of USE.
Greg is correct, the media server goes nuts the first two to three days after (re)flashing or taking up a device. You can improve the situation by keeping your folder structure clean and neat and trash out left over files, old garbage and file system junk.
Thanks for your posts in both threads.
As for mediaserver, yes all is quiet now.
Not sure about which system files to delete at this stage, but I sure do keep a neat folder structure for my content.

Task switching without reloading? What memory is required?

Am running PA 3.60 which is great. I've now run some additional script that culls out and slims down the ROM and gapps. Again, everything runs great. I probably have a lot more memory free now than before. But I'm not sure what good that is.
Traditionally, we want to free up memory so we can install more apps - a2d and other methods help to keep things clear.
I don't want to do that - I want to be able to run more than one or two apps at the same time. But I don't know which memory types to clear up to do that.
The ROM is in, well, ROM, so making it smaller may not help free up memory if there's fixed 512MB used for it.
I know Android is actually running a lot of processes at once. What I mean is that if I load an app, say Candy Crush, then run another app, say Grindr, I can switch back and forth pretty much ok and each app resumes where it left off without any noticable reloading/refreshing. But if I then run another app, say Scruff, then as soon as I try to switch back to one of the others, it has to reload/refresh/restart. So clearly, there wasn't enough memory available to keep all 3 resident and it swapped some out or simply released it.
Logically, if I have more of a certain type of memory free, this will not happen as often. I know it depends on how much memory and other resources an app requires, but I don't need to get into that level of analysis yet. First and foremost, what sort of memory should I try to make as much of as possible to let me swtich between apps without so much reloading?
douginoz said:
Am running PA 3.60 which is great. I've now run some additional script that culls out and slims down the ROM and gapps. Again, everything runs great. I probably have a lot more memory free now than before. But I'm not sure what good that is.
Traditionally, we want to free up memory so we can install more apps - a2d and other methods help to keep things clear.
I don't want to do that - I want to be able to run more than one or two apps at the same time. But I don't know which memory types to clear up to do that.
The ROM is in, well, ROM, so making it smaller may not help free up memory if there's fixed 512MB used for it.
I know Android is actually running a lot of processes at once. What I mean is that if I load an app, say Candy Crush, then run another app, say Grindr, I can switch back and forth pretty much ok and each app resumes where it left off without any noticable reloading/refreshing. But if I then run another app, say Scruff, then as soon as I try to switch back to one of the others, it has to reload/refresh/restart. So clearly, there wasn't enough memory available to keep all 3 resident and it swapped some out or simply released it.
Logically, if I have more of a certain type of memory free, this will not happen as often. I know it depends on how much memory and other resources an app requires, but I don't need to get into that level of analysis yet. First and foremost, what sort of memory should I try to make as much of as possible to let me swtich between apps without so much reloading?
Click to expand...
Click to collapse
Try enabling zram, I haven't tried it personally but its supposed to allow for more multitasking.
Sent from my Nexus One using xda app-developers app
Moved To Q&A​
You may of considered it dev based, but its a question so belongs in the Q&A section.​
I've tried ZRAM now for a couple of days but makes no difference. I also have the problem on another Android device. I'm convinced its some sort of design limitation of the opsys or something. When I start up Grindr, it takes a long time to load all the images, make connections, etc. Then I start of Gruff, and it does the same. As long as I don't try to go to another app, I can flip between the two of them without them restarting/reloading/reinitialising themselves. That is clearly because their pages didn't get swapped out of memory or flagged for deletion and deleted.
But if I do something else, or even try to use additional functions within either app, its too much and the next time I try to flip to the other app, it has to reload and reestablish connections etc.
Its not just those apps either. The same with a game like Candy Crush. Or many many apps.
So either my devices don't have enough memory of some form to allow many concurrent apps to run without being swapped out, or Android can't handle it and unnecessarily swaps out or deletes a process's memory pages to make room for the next process, >>> even if the device has plenty of memory<<<.
I don't know which type of memory the opsys needs if this is the case. I'd like to know so that i can make sure there's ample available so that this constant restarting doesn't keep happening. It seems stupid to me that Android does this if the device has got "heaps" of available memory (no pun intended). Newer devices will continually have more and more built in memory, so if Android is doing this arbitrarily and not because of space issues then its, well, stupid.
I have to assume its my devices that are the problem. They're both old (Nook Color, Nexus One). But with the NC, I'd assume we can partition some of that 5GB for use as main memory to run lots of processes concurrently, without this annoying swapping/page deletion/forcing re-inits all the time.
I'm also having problems figuring out where in XDA to post this question - its not NC specific, or dev specific, but I need answers from people that know the Android architecture so I can work out if its possible to stop this from happening.

Categories

Resources