This is a performance improvement for the Method File reading procedure. This is related to issue #40.
I tried to read a method with 24k test cases, and it got stuck in the execution of lines 368-370
This is the profiling result:
The previous code would first check the existence of the test case before adding it to the list. When we have 24k test cases, the cost of such procedure becomes exponentially expensive.
With a LinkedHashSet, the complexity of adding a test case to the set is O(1), while also keeping the insertion order.
Now the input of 24k test cases takes about a second.
This is a performance improvement for the Method File reading procedure. This is related to issue #40.
I tried to read a method with 24k test cases, and it got stuck in the execution of lines 368-370 This is the profiling result:
The previous code would first check the existence of the test case before adding it to the list. When we have 24k test cases, the cost of such procedure becomes exponentially expensive. With a LinkedHashSet, the complexity of adding a test case to the set is
O(1)
, while also keeping the insertion order. Now the input of 24k test cases takes about a second.All tests are passing.