ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEEvolution very slow adding Info Text to Thumbnails in IEMulti
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

brandonbrown

USA
37 Posts

Posted - Jan 23 2022 :  11:42:34  Show Profile  Reply
For some unknown reason, adding a simple string to the InfoText, for a 500 image IEMulti Imagelist is taking a super long time, like 1 second per thumbnail.

It is not a 32/64 bit issue, but rather in my production application taking forever long.

When I do this in another simple app just doing it, the process does not take that long.

Image Statistics: 66mb in size, 496 TIFF images inside the file
Any help/hints/issues with the following code?

// 500 page document
Stopwatch myTimer = new Stopwatch();
long loadTime=0;
long thumbNailTime=0;

myTimer.Start();
ieMulti1.ImageList.LoadImages(@"C:\batches\20220120-3333-0001.tif");
myTimer.Stop();
loadTime = myTimer.ElapsedMilliseconds;
myTimer.Reset();

ImageInfoClass imginfo;
IOParams imgIOParams;


for (int i = 0; i < ieMulti1.ImageList.ImageCount; i++)
{
//imgIOParams = ieMulti1.ImageList.GetIOParams(i);
imginfo = ieMulti1.ImageList.GetImageInfo(i);
imginfo.InfoText = i.ToString();

}

myTimer.Stop();
thumbNailTime = myTimer.ElapsedMilliseconds;
this.Text = "Load time: " + loadTime.ToString() + " Thumbnail Time: " + thumbNailTime.ToString();

brandonbrown

USA
37 Posts

Posted - Jan 23 2022 :  12:30:57  Show Profile  Reply
I have a workaround, but I don't really want to use it.

if I make the iemulti window not visible, it is significantly faster, but gives the application a blank window when doing so.

ieMulti1.Visible=false;

<Thumbnail code here>

ieMulti1.Visible=true;
Go to Top of Page

xequte

38610 Posts

Posted - Jan 23 2022 :  23:21:13  Show Profile  Reply
Are you using LockUpdate/UnlockUpdate?

https://www.imageen.com/ievolutionhelp/html/fb5a2e07-1eb4-f984-50f9-b59de4fae24c.htm

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

brandonbrown

USA
37 Posts

Posted - Jan 24 2022 :  17:32:46  Show Profile  Reply
Thanks Nigel! I like this better, however it is no faster, but the screen isn't blank! Thanks again!

I rewrote a read only console tool to read the TIFF file name from the image file, and it is slow also, obviously not a GUI component here. Is it the way I am doing the read? 1009 page TIFF file takes 55 seconds?

1000 - Name: 117-118-0016 Number: 0
1001 - Name: 117-118-0016 Number: 0
1002 - Name: 117-118-0017 Number: 0
1003 - Name: 117-118-0017 Number: 0
1004 - Name: 117-118-0018 Number: 0
1005 - Name: 117-118-0018 Number: 0
1006 - Name: 117-118-0019 Number: 0
1007 - Name: 117-118-0019 Number: 0
1008 - Name: 117-118-0020 Number: 0
Reading TIFF Pagenames on 1009 images took 55 seconds.

Stopwatch myTimer = new Stopwatch();
myTimer.Start();
IEMulti img = new IEMulti();
inFiles.ForEach(delegate (string fileName)
{

img.ImageList.LoadImages(fileName);
Console.WriteLine("{0} Pages: {1}", fileName, img.ImageList.ImageCount);

for (int i = 0; i < img.ImageList.ImageCount; i++)
{
IOParams myIOParams = img.ImageList.GetIOParams(i);
Console.Write("{0} - Name: {1} Number: {2} ", i, myIOParams.TIFF_PageName, myIOParams.TIFF_PageNumber);

Console.WriteLine();


}


});
myTimer.Stop();
Console.WriteLine("Reading TIFF Pagenames on {0} images took {1} seconds.", img.ImageList.ImageCount, (myTimer.ElapsedMilliseconds / 1000).ToString());
Go to Top of Page

xequte

38610 Posts

Posted - Jan 24 2022 :  18:08:35  Show Profile  Reply
Hi

Is the slowness in the loading (expected) or the reading of params (unexpected)?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

brandonbrown

USA
37 Posts

Posted - Jan 24 2022 :  18:43:35  Show Profile  Reply
Again Nigel, you are right. It's a 125mb file, so it's the loading, not of the params. I guess that's just how long it takes to read a large file, or decompress it or something.
Go to Top of Page

brandonbrown

USA
37 Posts

Posted - Jan 24 2022 :  19:01:05  Show Profile  Reply
Any suggestions on reading a 100mb into the tool quickly? 1000 pages is the limit to what I want them to do. The concept of saving a 'snap' is a HUGE savior!
Go to Top of Page

xequte

38610 Posts

Posted - Jan 24 2022 :  19:57:26  Show Profile  Reply
Hi

You can use LoadSnapshot() and SaveSnapshot().

Or you can load images on demand using the format fullfilepath::imageindex, e.g.

ieMulti1.ImageList.AppendImage(@"C:\batches\20220120-3333-0001.tif::0");
ieMulti1.ImageList.AppendImage(@"C:\batches\20220120-3333-0001.tif::1");
ieMulti1.ImageList.AppendImage(@"C:\batches\20220120-3333-0001.tif::2");
etc.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: