libraryClassFilesAreInterfacesOnly
actually doesn’t change how the classes are loaded - it basically reflects how the classes are expected to be loaded. That is, it might be possible that the “discarding" loader was used but libraryClassFilesAreInterfacesOnly is still false.
val x = Set(..); x.filter(…).map(..).toList
creates two intermediate sets before the list is finally created. Rewriting such code to avoid the creation of intermediate collections (e.g., by using foldLeft and withFilter) can lead to very significant performance improvements. But, this is only a wild guess given that I don’t know your code at all...
def analyze(method: DeclaredMethod): PropertyComputationResult = {
if (!method.hasSingleDefinedMethod)
return Result(method, MethodWithAllocations);
if (method.definedMethod.isNative)
return Result(method, MethodWithAllocations);
return Result(method, MethodWithAllocations);
}
44,45c44,45
< allocationFreeMethods.map(_.e).mkString("allocation free: ", "\nallocation free: ", "\n")+
< methodsWithAllocations.map(_.e).mkString("with allocations: ", "\nwith allocations: ", "\n")+
---
> // allocationFreeMethods.map(_.e).mkString("allocation free: ", "\nallocation free: ", "\n")+
> // methodsWithAllocations.map(_.e).mkString("with allocations: ", "\nwith allocations: ", "\n")+
65c65
< ???
---
> return Result(method, MethodWithAllocations);