Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, February 26, 2008 1:47:28 AM(UTC)
boris.neuberger

Groups: Registered
Posts: 4


Some Leadtools functions seem to suffer a decrease in performance by factor 2 on a dual core cpu and by factor 4 on a quad core cpu.

We could recognize this slow down for
L_CopyBitmap(&DestHandle, &m_BitmapHandle, sizeof(DestHandle));
and
L_SizeBitmap(&DestHandle, NewWidth, NewHeight, SIZE_RESAMPLE);

Does anybody have similar problems?
We are not able to reproduce the same problems in the leadtools samples.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, February 26, 2008 3:43:45 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Since the problems can not be produced on using our demo samples I think they  are most likely related to your code. Make sure that you check your code for any memory leaks and that you handling the allocation and freeing of memory correctly.

Also, I would like to send you updated version of our LEADTOOLS DLLs. Can you please tell me the DLLs build number(Version info) that you have? 
 
#3 Posted : Tuesday, February 26, 2008 11:24:35 PM(UTC)
boris.neuberger

Groups: Registered
Posts: 4


The dll's all have a
file version of 14.0.0.35 and a
product version of 14.0.0.035

We are running the Leadtools dll's in a multithreaded C++ WIN32 application developed with MS Visual Studio 2003. The Leatools functions are called withing the user interface thread and are not influenced by other background threads.
 
#4 Posted : Wednesday, February 27, 2008 12:59:30 AM(UTC)
boris.neuberger

Groups: Registered
Posts: 4


I have created a simple mfc-sample application (leadperf.sln) that shows the problem.

In this sample you can open an image with the open file dialog. This image is loaded, copied and resized for 5 times with the following code:

BOOL CleadperfDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
int iLoops = 5;
int iSuccess = 0;
time_t tStart = time(NULL);
while (iLoops-- > 0)
{
BITMAPHANDLE BitmapHandle;
L_INT iRes = L_LoadBitmap((L_TCHAR *)lpszPathName, &BitmapHandle, sizeof(BitmapHandle), 0, ORDER_BGR, NULL, NULL);
if (iRes == SUCCESS)
{
BITMAPHANDLE DestHandle;
iRes = L_InitBitmap(&DestHandle, sizeof(DestHandle), BitmapHandle.Width, BitmapHandle.Height, BitmapHandle.BitsPerPixel);
if (iRes == SUCCESS)
{
iRes = L_CopyBitmap(&DestHandle, &BitmapHandle, sizeof(DestHandle));
if (iRes == SUCCESS)
{
iRes = L_SizeBitmap(&DestHandle, 500, 500, SIZE_RESAMPLE);
if (iRes == SUCCESS)
{
iSuccess++;
}
}
}
}
}
time_t tEnd = time(NULL);
char Msg[1000];
sprintf(Msg, "Test run %d times with success in %d seconds.", iSuccess, tEnd-tStart);
MessageBox(NULL, Msg, "", 0);
return FALSE;
}

If you use the sample images (test1.jpg or test2.jpg) in the folder "Images" you can see that it runs about 4 seconds on a single core cpu and takes 15 seconds on a (even faster) dual core cpu!!!

 
#5 Posted : Wednesday, February 27, 2008 1:33:07 AM(UTC)
boris.neuberger

Groups: Registered
Posts: 4


Further tests have shown, that it is NOT a dual core problem, but dependent on the operating system.

It is slow on a Windows Vista and on a Windows Server 2003 (SP2) system, but fast on a Windows XP (SP2) system.

Our customers told us, that is was also fast on a Windows Server 2003 prior to SP2. But we didn't proof this configuration.

 
#6 Posted : Wednesday, February 27, 2008 7:29:01 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


Boris,


Before I test your small
project here I would like to send you the latest LEADTOOLS patches since you are running a very old build. Can you please send your serial number to support@leadtools.com for verification?

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.105 seconds.