please help to understand: speed gflLoadThumbnail vs. xnview

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: helmut, XnTriq, xnview

Post Reply
klaus2

please help to understand: speed gflLoadThumbnail vs. xnview

Post by klaus2 »

Following test:

A directory containing 450 images
A simple Delphi program loop that does, for testing, not more than simply calling
gflLoadThumbnail for each of those images (no more action than this call)
--> Processing time: 38 seconds
(playing around with various parameter settings i found no speed impact here).

_versus_

- xnview loading the thumbnails for the same directory
*** using no cache (Options|Browser|Cache|Enable caching = off)
*** using no embedded thumbnails (Options|Browser|Thumbnail|Use embedded thumbnail = off)
--> Processing time: 11 seconds

Please help me to understand the reason for this drastic speed difference
(gflLoadThumbnail 3 to 4 times slower than xnview) so that i can see if i did an error
and have a hint or direction how to fix that.

Many thanks for your help in advance!
klaus 2
klaus2

Post by klaus2 »

please help ... any advice from the experts?

kind regards,
klaus2
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

klaus2 wrote:please help ... any advice from the experts?
Could you try with GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE flag?
Pierre.
klaus2

Post by klaus2 »

yes Pierre, already tried
lp.Flags := GFL_LOAD_SKIP_ALPHA;
lp.Flags := lp.Flags or GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE;
but that does not make any noticeable difference:
.
466 objects
- xnview (without cache !, without use embedded thumbnails !)
-> 17 seconds
- delphi pg using gflLoadThumbnail without loadparam GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE
-> 32 seconds
- delphi pg using gflLoadThumbnail _with_ loadparam GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE
-> 30,9 seconds
.
Thats very frustrating. So the basic question is:
is the prog using the libgfl function gflLoadThumbnail expected to run at comparable speed with xnview ?

Many thanks for clarification,
klaus2
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

klaus2 wrote:yes Pierre, already tried
lp.Flags := GFL_LOAD_SKIP_ALPHA;
lp.Flags := lp.Flags or GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE;
but that does not make any noticeable difference:
.
466 objects
- xnview (without cache !, without use embedded thumbnails !)
-> 17 seconds
- delphi pg using gflLoadThumbnail without loadparam GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE
-> 32 seconds
- delphi pg using gflLoadThumbnail _with_ loadparam GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE
-> 30,9 seconds
.
Thats very frustrating. So the basic question is:
is the prog using the libgfl function gflLoadThumbnail expected to run at comparable speed with xnview ?
gflLoadThumbnail & xnview use same basic function, so it's strange...
You have not GFL_LOAD_HIGH_QUALITY_THUMBNAIL?
You try on jpeg file?
Pierre.
klaus2

Post by klaus2 »

Hi Pierre,

no high quality ... as told:
lp.Flags := GFL_LOAD_SKIP_ALPHA;
lp.Flags := lp.Flags or GFL_LOAD_PREVIEW_NO_CANVAS_RESIZE;

Glad to hear that gflLoadThumbnail & xnview use same basic function!
very interested to find out the culprit!

Nearly all files are jpegs.

For to achieve the 32 seconds, i already involve 5 threads .. else it would take much more.
the only speedup i saw is to replace the libgfl by Delphi native jpeg VCL (-> ca 19 seconds)
but that's really not what i want to do.

May it be the case that using the dll slows it down much compared with a static lib?

Any hint or recommendation is very welcome!

Best regards,
klaus2
PS: hopefully it is ok for you: i sent you by mail a simplified testcase (with source) that does not more
than looping on all ico/bmp/jpg files on a selected directory, calling glfLoadThumbnail for those files
and showing the overall processing time.
So, using on a large directory, you could tell me if that is the processing time you would expect
compared with xnview and what possibly goes wrong here.
My test system is a Win98 pc.
klaus2

Post by klaus2 »

Hello,

did you receive the sample?

Best Regards,
klaus2
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

klaus2 wrote:Hello,

did you receive the sample?
Yes i'll take a look asap
Pierre.
LuisR

Same problem to me...

Post by LuisR »

I've tried to do the same thing (thumbnail loading) with Delphi7 & WinXP and it takes so much time to create/display the thumbnails.
I'm using the the demo that comes with GFL SDK for Delphi...
Any ideias to fix this?

Thanks in advance
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

klaus2 wrote:Hello,

did you receive the sample?

Best Regards,
klaus2
I'll reply by email... It's very strange...
Pierre.
klaus2

Post by klaus2 »

I answered by mail, dealing mainly with the load params, and the aspect "dll or static lib?".
Very strange im my eyes too.

Same speed difference to C when using gflGetDefaultLoadParams and using the functions from the libgfl240.dll (instead of a static lib) ?
klaus2

Post by klaus2 »

received for testing an early version of the libgfl252.dll -
and with this version i don't have the problem :-) :-)
Guest

Post by Guest »

klaus2 wrote:received for testing an early version of the libgfl252.dll -
and with this version i don't have the problem :-) :-)
really?... how can I test that version too?
Post Reply