showfoto and imageeditor jpeg loading

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

showfoto and imageeditor jpeg loading

D Bera
Hi
  Do showfoto and imageeditor have any significant differences in the
way they load jpeg files ? From brief glances at the code both seem to
use dimg in the same way. I ask this because:

1) I found one image that is correctly rendered by showfoto, preview
(f3 in digikam) and thumbnailer but the image-editor only shows 10%
from the top and then grays the rest.

I can email the image to someone if needed.

2) Putting QTime.start/elapsed across JPEGLoader.load, for the same
image showfoto is taking 200-400ms whereas image-editor is taking
1000-7000ms.

If you want precise figures, I can provide them. These are all 4-5
MegaPix JPEGs from olympus digital camera, downloaded and edited by
digikam.

I was basically trying to see why image-editor takes 5-10 secs to load
images whereas showfoto 1-2 secs. If you need me to run more
experiments, I will be happy to do so.
Thanks for digikam.

- dBera

--
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: showfoto and imageeditor jpeg loading

Marcel Wiesweg
> Hi
>   Do showfoto and imageeditor have any significant differences in the
> way they load jpeg files ?

The code is exactly the same. (Even parts of the GUI code is shared, by
inheriting from EditorWindow. Canvas, DImgInterface, the threaded loader, the
DImg loaders are used by both)

> From brief glances at the code both seem to
> use dimg in the same way. I ask this because:
>
> 1) I found one image that is correctly rendered by showfoto, preview
> (f3 in digikam) and thumbnailer but the image-editor only shows 10%
> from the top and then grays the rest.
>
> I can email the image to someone if needed.

You can send me the image.

>
> 2) Putting QTime.start/elapsed across JPEGLoader.load, for the same
> image showfoto is taking 200-400ms whereas image-editor is taking
> 1000-7000ms.

I'd say as you put the QTime statements in one source file only, for both
apps, this shows that the code is the same.
What may happen is that something is done at the same time in a different
thread/process that is taking CPU time.

First guess (using Gentoo directory layout):
mv /usr/kde/3.5/lib/kde3/kio_digikampreview.so /usr/kde/3.5/lib/kde3/kio_digikampreview.so_
to disable the preview ioslave. Start digikam, check if the situation
improves.

>
> If you want precise figures, I can provide them. These are all 4-5
> MegaPix JPEGs from olympus digital camera, downloaded and edited by
> digikam.
>
> I was basically trying to see why image-editor takes 5-10 secs to load
> images whereas showfoto 1-2 secs. If you need me to run more
> experiments, I will be happy to do so.
> Thanks for digikam.

What CPU and memory do you have?
10 seconds for a JPEG sounds really long.

Marcel

>
> - dBera
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: showfoto and imageeditor jpeg loading

D Bera
> What CPU and memory do you have?
> 10 seconds for a JPEG sounds really long.

384MB / 2GHz celeron / running mandriva-2007 / xfs on all relevant partitions.

I noticed something else. There is a _huge_ amount of disk access during that
few seconds loading time. I have the store all metadata in image _and_
database option checked. The images are not large - max 1.5MB.
Also its not the images or machine. Because, showfoto doesnt take that long or
doesnt cause that much disk access.

I will try to figure out whats going wrong.

The direct codepath to jpegloader is same - I was wondering if the imageeditor
is trying to do something in another thread maybe ? Dunno ... but I have the
source, so I wont complain ;-).

Thanks.
- dBera

--
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: showfoto and imageeditor jpeg loading

Hubert Figuiere-3
Debajyoti Bera wrote:

>> What CPU and memory do you have?
>> 10 seconds for a JPEG sounds really long.
>
> 384MB / 2GHz celeron / running mandriva-2007 / xfs on all relevant partitions.
>
> I noticed something else. There is a _huge_ amount of disk access during that
> few seconds loading time. I have the store all metadata in image _and_
> database option checked. The images are not large - max 1.5MB.
> Also its not the images or machine. Because, showfoto doesnt take that long or
> doesnt cause that much disk access.

384MB? Wow.
What matters is not the size of the JPEG file but the real size of the
image. h * w * bit-depth. Something like a 4MPix image require 4 * 4 =
16 MB..

I would guess that your machin is way too much swapping.

Hub
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users