Hi,

I added some small time.clock() to the code, to see where we have a
speed problem right now. I made debug code at the following points:
menu:          menu.py, call actions() and call the default action
check_cache:   ppython cache loading
build:         the complete build function in DirItem (including
               check_cache) 
menu prep:     make a Menu and prep it
push menu:     show the menu (including all the skin code)
all:           complete time for the action


python 2.2.3, a directory with 700 images
-----------------------------------------
menu:             0.07
check cache:      0.44
build:            1.27
menu prep:        0.0
push menu:        0.15
all:              1.49


So check_cache is our main problem here. 0.44 seconds from the whole
build call. Build itself is a problem, but it also creates all items
and sorts them. The menu code takes 0.15 seconds. Not bad, since this
also includes loading all thumbnails from the thumbnail cache.


python 2.3 runtime, same dir
----------------------------
menu:             0.06
check cache:      0.40
build:            0.95
menu prep:        0.0
push menu:        0.13
all:              1.14

Better, but ow we see that the mmpython cache takes nearly half the
time of the complete build.

Next, I used 2.4 and the runtime and only tried different directories: 

video dir with 5 files:
-----------------------
menu:             0.0
check cache:      0.01
build:            0.02
menu prep:        0.0
push menu:        0.13
all:              0.15


small image dir:
----------------
menu:             0.0
check cache:      0.01
build:            0.02
menu prep:        0.0
push menu:        0.12
all:              0.14


Conclusion: two bottle necks: the skin code and the build code. The
skin can't be much faster, since this all includes loading images and
doing the pygame drawing stuff. The skin code is also independed of
the number of files. The build function creates many objects, I don't
see much code to make thigs faster here, except the mmpython cache.


JFYI


Dischi
-- 
In a world of freedom, why do some people use windows and gates?



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to