Rockbox mail archiveSubject: Re: max 200 entries in a dir. why?
From: Björn Stenberg (bjorn_at_haxx.se)
John Wood wrote:
Because it's useless.
Dynamic memory is only ever useful if you have memory consumers (tasks) that run at different points in time, and thus can reuse the same memory for different purposes. We don't have that. We must be able to show a big dir, index a big playlist and play a big mp3 file, all at the same time. They cannot use the same memory, and thus dynamic memory buys us nothing but extra complexity.
If we used dynamic memory for this, we would get all kinds of odd bugs. Playlists that only got half-loaded if placed in certain directories. Parts of the disk you couldn't go to if playing a certain playlist etc.
We have a number of tasks that consume memory. They can all run at the same time, using all of their alotted memory. Therefore it is much better to allocate that memory to them beforehand and not pretend that anyone else is able to use it. This is standard practice in memory-limited systems.
> It would have been better to implement directory caching the same way
There's a world of difference between playlists and directories:
This is my last response in this issue. I haven't seen anyone come up with a single reason *why* we should support huge dirs, only half-baked ideas for unworking kludges.
I'll be over there writing code. You guys have fun.
Page was last modified "Jan 10 2012" The Rockbox Crew