Page 1 of 1

Why use a individual ArrayList<Media> mItemList?

Posted: 23 Dec 2013 02:13
by dfdf
Why use a individual ArrayList<Media> mItemList(mItemList @ MediaLibrary.java) rather than using Database cursor directly?Listing medias is a long time at startup,maybe fulling this mItemList is the prime criminal? Not need to mention the rather big memory usage. But I guess there must be some strong reasons.

Re: Why use a individual ArrayList<Media> mItemList?

Posted: 23 Dec 2013 19:41
by Jean-Baptiste Kempf
Probably because it was faster to code. And you probably need preparsing....

But if you can do the same faster, patches are welcome.

Re: Why use a individual ArrayList<Media> mItemList?

Posted: 23 Dec 2013 19:45
by edwardw
Not to mention the absurd state of cursors, databases, and crashes related to those...

Re: Why use a individual ArrayList<Media> mItemList?

Posted: 24 Dec 2013 03:37
by dfdf
Not to mention the absurd state of cursors, databases, and crashes related to those...
OK,relax,just out of curiosity.
I'm afraid I can't do any patches,I just feel the media listing Activity is a bit slow. Well,it's not a problem,forget it please.

Re: Why use a individual ArrayList<Media> mItemList?

Posted: 08 Jan 2014 13:43
by XilasZ
At startup, vlc browse folders recursively to find new files to add to the database, or remove deleted ones.
This scan can take some times depending on how many folders/files you have on the device.

One way to speed this up, is to go in preferences, and only select music & video folders, to avoid wasting time scanning system folders, pictures folders, ...

Re: Why use a individual ArrayList<Media> mItemList?

Posted: 09 Jan 2014 16:23
by dfdf
At startup, vlc browse folders recursively to find new files to add to the database, or remove deleted ones.
This scan can take some times depending on how many folders/files you have on the device.

One way to speed this up, is to go in preferences, and only select music & video folders, to avoid wasting time scanning system folders, pictures folders, ...
Good point,thank you!