Rockbox General > Rockbox General Discussion

Optimizing Rockbox Sources

<< < (2/6) > >>

the_winch:
The problem with dynamic memory allocation is you need a pool of unused memory to allocate from.
This conflicts with the desire to have as big an audio buffer as possible so the disk spins up as little as possible.

The prevailing view is the memory pool would be near enough the same size as everything statically allocated and so the simplest method won.

Llorean:
http://rasher.dk/rockbox/ircstats/all.php

Look at the most active nicks list, and pick a time when most of those are likely to be online. Pay careful attention to amiconn, because he's likely to be one of the strong arguers on this point. :)

Sentertainment:

--- Quote from: the_winch on December 30, 2006, 11:36:46 PM ---The problem with dynamic memory allocation is you need a pool of unused memory to allocate from.
This conflicts with the desire to have as big an audio buffer as possible so the disk spins up as little as possible.

The prevailing view is the memory pool would be near enough the same size as everything statically allocated and so the simplest method won.

--- End quote ---

OK, does make sense....
After knowing that, it is probably the most simple by far.  Is this also the way the default software (on the iPod) works?  I know it's optimized for the iPod, but even so the menus are significantly faster, not to mention much more graphical and animated.

Also, I think I may look into the operation of the audio buffer...I'm sure there have got to be more ways to optimized this or even an alternate way of allocating memory so some can be dynamic and some static.

Llorean:
The advantage the iPod menus have is that they're actually *less* dynamic than Rockbox's. Because the background is set, and there's only the builtin font, less work needs to be done with line scrolling and other things. There are probably a whole range of tricks that could be done if Rockbox only had a built in font, and no backdrops.

I'm not saying this is definitely the reason, but it's a start. Another thing is CPU usage. Go into the debug menu and boost the CPU without music playing, then scroll through the menus (preferably without a backdrop image) and depending on your player (I don't know how noticeable it is on 5G) you can see some speed difference in the menu from with the core unboosted. One of the problems is that we draw slowly, another is that we could use a much better wheel driver.

Sentertainment:
All understood...but then I have another question for that... :P

Couldn't you reserve a small amount of memory for certain things to be cached?
I haven't gotten far enough to look at the usage of fonts or anything even bear that (i don't even know the font structure, lol)
But you COULD easily render parts of images and cache it for later usage.

Anyways, give me some time to talk to the devs and look at the code more and then I'll be in a better position to discuss optimizations...like I've been hinting at, last night was my first compile and today is my first time actually reading the code. (I've only had rockbox running on my iPod for 72hrs or so)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version