(inputs: any[], outputs: any[])
| 247 | // Original difference takes 380ms on average to compute difference between 200 inputs and 1 output. |
| 248 | // The following function takes 1-2ms on average. |
| 249 | const differenceBasedOnId = (inputs: any[], outputs: any[]): any[] => |
| 250 | inputs.filter( |
| 251 | input => |
| 252 | !outputs.some( |
| 253 | output => |
| 254 | combineIdAndProp(input) === combineIdAndProp(output) |
| 255 | ) |
| 256 | ); |
| 257 | |
| 258 | // Find `requested` callbacks that do not depend on a outstanding output (as either input or state) |
| 259 | // Outputs which overlap an input do not count as an outstanding output |
no test coverage detected
searching dependent graphs…