I have around 20 objects in an image collection. I have seen that it significantly slows down the execution speed when the script tries to find an object in that collection. Is there any solution for this?
Are there any best practices to speed up the execution?
Thanks for your help!
20 images is a lot to have in a collection, and it means that eggPlant needs to search for each of them in turn before finding or not finding them.
My first suggestion would be to ask if you really need all 20 images.
If so you might try limiting your search area before you do the image find, that will significantly speed up your image searching.
I dunno if this helps, but it helps me out, you need to turn “Animation Off”, you can find this on the “Run Window”.
Source: I have 20 folders, with 64 images a piece in the folders. It would usually take about 30-60 seconds to run if animation was on for each “image”. When I turn animation off, it takes about 1-3 seconds.
You can also do this via the global properties list if you are running execution mode.
SetOption ScriptAnimation, All
Set the ScriptAnimation to Off
Value: All (or true), Off (or false), or Calls
Description: The ScriptAnimation determines whether or not a script is animated (highlighted line-by-line in the Run window) as it runs, as follows:
• All or true. Each line of the script is highlighted as it is executed.
• Off (or false). The script is not animated.
• Calls. Each script or handler is highlighted, but not each line.
The ScriptTracing reverts to its default value upon completion of the script execution. (For more information, see Animation.)
Thank you very much for your suggestions .
I had already turned off the animation. I guess I would have to decrease the number of images in a collection. This is a real pain as I am using the same script for multiple languages. So, I created one collection for each object and it would contain images for the same object in several different languages.
If you are using different languages then you probably want to check out the CollectionFilter capability. This allows you to filter which images are valid based on name or image description. So if all your French images have the word French, you can limit to only use those.
Please see the Eggplant Reference manual for more information.
Where can I find the Eggplant Reference manual??
I haven’t seen anything actually referred to as a reference manual but I find the documentation here to be quite helpful.
I also often use the “More on this topic” button in the sensetalk browser if I want to find something else out about a command or tool.
I haven’t had an opportunity to try it myself, but I noticed that in the Release Notes for the version of ePF released this week, CPU spikes when searching collections has been resolved: http://docs.eggplantsoftware.com/ePF/gettingstarted/epf-v21-release-notes.htm