Duncan Webb wrote:
> Francisco Eduardo Álvarez Solano wrote:
>>> A quick test on a directory of 111 photos (2816x2112) the memory goes
>>> up from 260MB to 540MB until the cursor is being moved around to the
>>> next page then memory goes up to 720MB. Moving back a page then the
>>> memory remains at 720MB.
>>>
>>> Then going to audio the memory goes down to 715MB.
>>>
>>> Not sure quite what the problem is, can you give a bit more detail?
>> I've made a directory with 63 photos (3264x2448). When I enter the
>> directory with Freevo 1.8.3, the memory raises to 813-900Mb, and when
>> I try to go to the next page, Freevo crashes. If I try with a
>> directory with less photos, changing from one page to another lasts
>> several seconds.
>>
>> If I do the same test with Freevo 1.8.2, the memory footprint stands
>> without change, and I can navigate through the directory quickly and
>> without any problem.
>>
>> I'll send several screenshots of Freevo 1.8.3 and Freevo 1.8.2 with
>> gnome system monitor in which you can see the memory and cpu
>> footprint.
>
> When I check the code differences between 1.8.2 and 1.8.3 there are
> quite a few changes to the osd.py module that deals with images. Will
> you try taking the 1.8.2 osd.py module and replace it the 1.8.3
> site-packages (remove the osd.pyc) and then see what happens?
>
> Attached is a patch that deletes temporary images, which may help.
Attached is a patch that should reduce the memory and speed up the
display of images, it may not be 100% correct yet (lack of rotation and
using the thumbnails for the full image).
The thumbnails can be generated with the helper "mkimagemrss" and the
size of the thumbnail can be controlled with: WWW_IMAGE_THUMBNAIL_SIZE.
The patch applied to 1.8.3 with some fuzzy offsets.
Will you try this and provide some information if it helps.
Duncan
Index: src/skins/main/skin_utils.py
===================================================================
--- src/skins/main/skin_utils.py (revision 11318)
+++ src/skins/main/skin_utils.py (working copy)
@@ -66,7 +66,8 @@
@benchmark(benchmarking & 0x08, benchmarkcall)
def format_image(settings, item, width, height, force=0, anamorphic=0):
- #print 'format_image(settings=%r, item=%r, width=%r, height=%r, force=%r, anamorphic=%r)' % (settings, item, width, height, force, anamorphic)
+ _debug_('format_image(settings=%r, item=%r, width=%r, height=%r, force=%r, anamorphic=%r)' % \
+ (settings, item, width, height, force, anamorphic), 2)
try:
type = item.display_type
@@ -79,7 +80,7 @@
type = ''
- item_image=Unicode(item.image)
+ item_image = Unicode(item.image)
cname = '%s-%s-%s-%s-%s-%s-%s' % (settings.icon_dir, item_image, type, item.type, width, height, force)
@@ -104,15 +105,23 @@
if not os.path.exists(item.image):
return None, 0, 0
+ for folder in ('.thumbs', '.images'):
+ image_parts = os.path.split(item.image)
+ imagefile = os.path.join(image_parts[0], folder, image_parts[1])
+ if os.path.exists(imagefile):
+ break
+ else:
+ imagefile = item.image
+ print 'thumb://%s' % (item.image,)
image = load_imagecache['thumb://%s' % item.image]
if not image:
- image = osd.loadbitmap(item.image)
+ image = osd.loadbitmap(imagefile)
load_imagecache['thumb://%s' % item.image] = image
if not item['rotation']:
try:
- f=open(item.image, 'rb')
- tags=exif.process_file(f)
+ f = open(imagefile, 'rb')
+ tags = exif.process_file(f)
f.close()
if tags.has_key('Image Orientation'):
orientation = tags['Image Orientation']
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users