The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[SOLVED] Caching getParameterTypes?
I've noticed that the getParameterTypes method of my home-brew operator gets called quite often. It gets called during RapidMiner's startup, when it loads the plugins (fair enough), but also twice every time my operator is selected in the Operators palette of the GUI:
Any thoughts/warnings/caveats concerning the possibility of rewriting my getParameterTypes so that it caches the List<ParameterType> it builds the first time, in order to return the cached List when it gets called again? The cached values would be specific to each instance of the operator, right?
Nov 26, 2012 2:06:16 PM com.rapidminer.tools.WrapperLoggingHandler log
INFO: LTFDataReader: CachedLTFExampleSource.getParameterTypes begins.
Nov 26, 2012 2:06:29 PM com.rapidminer.tools.WrapperLoggingHandler log
INFO: LTFDataReader: CachedLTFExampleSource constructor done.
...
Nov 26, 2012 2:06:30 PM com.rapidminer.tools.WrapperLoggingHandler log
INFO: LTFDataReader: CachedLTFExampleSource.getParameterTypes begins.
Nov 26, 2012 2:06:39 PM com.rapidminer.tools.WrapperLoggingHandler log
INFO: LTFDataReader: CachedLTFExampleSource constructor done.
Tagged:
0
Answers
yes, getParameterTypes is called quite often. Because of this it should not take too long to finish.
If you want to cache your parameterTypes you could try to do something like this: And yes the cached values are specific for each instance of the operator.
Best,
Nils