April 8, 2011
“Fà e desfà l’è töt un laurà”
“Do and undo are both a job”
(A proverb from Brescia, Italy)
In order not to load all the images of a directory and hence saturate RAM, only the surrounding images of the current one are loaded. This has been implemented in r74, obtainable via Bazaar (see “Get it” page for details).
So while you step to the next images, luce loads one image which is ten images forward and unloads an image which is eleven images backward. Well, kind of.
This makes luce baaarely usable, and still very fast.
March 24, 2011
Let’s give a look inside the luce engine.
Luce heavily uses multithreading. Its aim is to parallelize every single step that can get some advantage from this.
So while a picture is being loaded, the corresponding texture for the previuos picture is created. Also, every image can be processed as soon as it is loaded. The loading thread goes in the background and gives data to the next step of luce’s pipeline.
We have dual-, quad-, core microprocessors but this functionality is not fully used by our softwares. Luce already hits about 25% (two threads on average on my 8-threads CPU) during the first phase, when most of the images are processed, but I plan to go further.
March 21, 2011
Luce v.0.0.3 is out!
This is the first version using massively multithreading in order to improve performance.
Tons of bugfixes too, details here.
You can get it here (direct link to tarball here)
March 19, 2011
I’m getting a little more comfortable about threads. The loader is not yet implemented but now it is run in the background. Mutexes make everything work.
I see some glitches and a lot of memory leaks, I have to work on them now.
March 10, 2011
Here’s a prototype of the background loader algorithm:
int N = number of image;
int cur = pointer to current image;
bool going_forward = current direction
int max_memory = maximum memory for luce
int cur_memory = current used memory
bool async_load = do async/sync load
if(!ThumbIsLoaded(next) && ThumbIsLoadable(next) && !ThumbIsLoading(next))
if(!ScreenIsLoaded(next) && ScreenIsLoadable(next) && !ScreenIsLoading(next))
if(!ThumbIsLoaded(prev) && ThumbIsLoadable(prev) && !ThumbIsLoading(prev))
break; //usually triggered by a keypress
March 8, 2011
Release 39 is Luce 0.0.2 and it is avalaible here:
Changes from release 37
Enhanced support for fullscreen;
avoided upscaling of small pics.
March 8, 2011
Release 37 now works for all resolutions and it is limited at 60 fps; I suppose this limit is given by the keyboard typematic rate. This is a quite good result!
I have introduced a barely working full screen functionality (use the f key).
V move down text in full screen mode
V do not upscale small pictures
V resize function
V package 0.0.2
- start background loading of images instead of preloading
- enhance jpeg loader