Performance hit after processing ~10 images
I'm processing hundreds of images using image math, and'ing with a skeletonized image. Four images are opened and I collect 2 pieces of data in two data collections per image processed. The data collection involves counting 200-500 features in one of the images, and data collecting the area of the grid. I close all images before opening and processing the next image. after about ten images processed, the performance takes a major hit. Is there something I can do to maintain performance? Using 9.3, latest revision.
Thanks
Thanks
0
Best Answer
-
jcov, if you use macros to create images, be sure that all the images are released (they may be invisible, but still stay in memory). There is CountImages macro in the Debugging project that can report leaking images, here is the forum topic that discusses this issue: http://forums.mediacy.com/discussion/619/processing-in-batch-slows-down-permamently/p1
Currently the latest version is 9.3.1, you can download the update from our update page (scroll down): http://www.mediacy.com/support/productupdates
Yuri
0
Answers
Thanks, Yuri.
Running the GarbageCollect worked. I probably ran it excessively (after each image processed), but it worked.
BTW, the routine did not work if the message box was commented out. In general, it would process about 10 images and the app would lock-up. The only way out (that I know of) was closing the app from Task Manager. I didn't actually look for leaking images.
One other note: I'm not sure if the timing of all these operations are causing issues (e.g. the previous paragraph). I'm running on a Dell Workstation Laptop, Core I& (8-core) and all images are on SDD drives. It seems like running garbage collection without the MsgBox delay should work.
We are using version 9.3.1.
Jeff
GarbageCollect without message box should also work. Maybe your SSD needs some time to release all files and MessageBox provided that delay. You may try adding DoEvents call instead of MsgBox to see if it helps.
Yuri
Jeff --
You might also add
'Give the OS a chance to catch up
System.Windows.Forms.Application.DoEvents()
to your code.
This has been helpful in allowing the PREMIER USER INTERFACE, PREMIER APPS, and the APP CODE to SYNC UP.
I hope this information is helpful.
-- Matt