How can I reduce [managed memory usage] ?
Hi guys,
The content of the macro is roughly [Open Image],[Apply Calibration] ,[Use 2D Filter], [Count], [Mask New Image], etc.
We developed a macro for image batch analysis on IP-10 version 10.0.7.
The images are all set to [visible=false], and after each image is counted, it will be closed.
Follow : https://forums.mediacy.com/discussion/709/batch-processing-limitations
Follow : https://forums.mediacy.com/discussion/709/batch-processing-limitations
At the beginning, it takes about 2 seconds to analyze an image, and after a while, it takes about 10 seconds for an image, and the [managed memory usage] cannot be reduced.
After testing, I found that the memory accumulate in [Apply Calibration], [Duplicate], [CreakMask], etc.
So I wrote a simple macro test.
[Apply Calibration]:

After testing, I found that the memory accumulate in [Apply Calibration], [Duplicate], [CreakMask], etc.
So I wrote a simple macro test.
[Apply Calibration]:

[Duplicate]:

After processing 14 images:

What should I add to the macro to reduce the usage rate of [managed memory usage]?
Attached is the simple test macro.
Thanks!
0
Answers
-
2020-09-14-100842Kyle1996 --I have never understood the benefits of the SIMPLESCRIPT feature in IMAGE-PRO.The existence of SIMPLESCRIPT routines in MODULES and APPS has sometimes bitten me because they seem to want to run whenever an image is opened by IMAGE-PRO.Normally I rip the references required by SIMPLE SCRIPT and make the routines only active when I call them specifically.I do this by removing theAs SimpleScriptfrom the routine declaration and by changing the reference to the ROUTINE in the code (ex "_2D_FILTERS") to "NOTHING" within the CODE likeWith Process.Filter.MorphologicalCommands.Close(Nothing)To understand the difference, you might want to put a DEBUG.PRINT into the routines before you make the change to see when they are being triggered.I think you will find that aDEBUG.PRINT "Hello from _2D_FILTERS"DEBUG.PRINT ThisApplication.ActiveDocument.DisplayNameafter the PUBLIC FUNCTION statement shows that it is running more often than you expect.I hope this information is helpful.Please let us know.-- Matt
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions