Skip optimization if TemplateParameterFilter is selected. Simple fix.
I think it's important that we retain the ability to optimize if set of tests is known. The javadoc for Report.Settings.getInitialFiles() should say that it's for/from the Configuration.
With the proposed fix, iteration of the entire test suite would be necessary. I suggest looking for an alternate fix which allows the iterator to be optimized for the Tests setting from the proper set (Configuration or Template).
I don't know an easy way how to implement optimization for template filter. For config filter there is a list of initial URLs returned by InterviewParameters.getTests() method. This list is dynamically updated whit every change to the configuration.
I don't know the place where the subset of test suite caused by a template loaded template can be stored.
I doubt that having such a list will result in optimization, because in such case we will have to refresh (or init) the list every time a template is loaded/created/modified. I believe that these actions are performed more often than report generation with "Current Template" filter.
It may be a more common operation, but iterating the entire test suite is so expensive when only a small subset needs to be reported upon.
For example, if only two tests are run, the report might/would trigger scanning of all 50k tests in the suite to generate the report.
I guess you are talking about optimization for the LastTestRun filter, which is a part of Issue63 (not implemented yet).
The current bug is about TemplateFilter and I believe we shouldn't apply optimization here.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.