Fix non duplicate feature perf #3013
I optimized the non duplicate app feature calculation by caching a map rule name => [RuleApp]
.
This lead to an overall performance gain of about 20% for most cost computations done by the strategies.
I made some assumptions about Node
that are not guaranteed by the interface (although I think they should be and Node
could easily be made immutable).
See the doc of getRuleAppsWithName
.
Two more things I noticed:
* NonDuplicateAppFeature::containsRuleApp
is always inverted
* Inverting the method to "does not contain" makes the code equal to noDuplicateFindTaclet
, so I called this one instead
Is this really the case? NonDuplicateAppFeature::filter
does a (now useless) case distinction over whether the position in occurrence is null and calls one of the two methods... It would be very odd if they did the same thing. Why would it be there if they were?
Artifacts
- 26. May 2023 22:51 (7956.09 kB large)
- 23. May 2023 11:46 (8003.12 kB large)
- 02. May 2023 17:53 (7990.01 kB large)
- 03. Feb 2023 15:05 (1371.97 kB large)
- 03. Feb 2023 11:43 (1387.23 kB large)
- 01. Feb 2023 17:49 (1386.66 kB large)