On 26/02/2010, James Pharaoh <ja...@phsys.co.uk> wrote: > Hi, > > I notice both these scripting facilities seem to recompile the script > every time they are used. I'm pretty sure this shouldn't be necessary > and that the performance could be increased significantly by compiling > once. Does anyone know any good reason this is not done?
Because one would have to keep track of whether the script changed during the test run, e.g. because the GUI used variable or function references. Or indeed another script might change the script file (unlikely, but there might be a use case for this). > Unless someone can demonstrate that it's too difficult, I'm going to > attempt to do this myself. In the case of BeanShell, just use a .bshrc file to define as much as possible using methods etc. and then just call the method in the GUI. The bshrc files are loaded once per thread. Not all BSF languages support compiled scripts, but for the ones that do, it should be possible to keep track of the source and recompile accordingly. Any such caching would need to be optional, as existing tests might implicitly rely on the fact that the scripts are not re-used. > Thanks, > James > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org > For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org