Hi Souflane,
it is not specifically designed to scale, it's just a set of glob patterns and the entire set is linearly iterated when a network resource fetch is attempted. Given the overall overhead associated with network requests, having a few hundred or patterns probably won't be noticeable, but something on the order of some tens of thousands may potentially slow things down. Another thing to consider is that this list is maintained in the renderer and there's additional overhead to replicate it to new renderers during cross-process navigation.
Depending on the size of the list, network interception may be your other option -- please see the
Fetch domain. You will basically receive an event when the network request is about to be sent, along with the resource URL, and will be able to implement the URL matching logic on the client side, in a way that optimally suits your application. There will be certain overhead as well, but of a different kind -- sending the protocol messages back and forth between the browser and the client and some additional proxying done by the underlying implementation of the Fetch domain.
Whichever is more efficient is highly dependent on the size of the list and other usage nuances.
Best regards,
Andrey.