Worker template incorrect regexp
-
Currently worker goes through all parameters in THIRD_PARTY_QUERY_PARAMETERS and uses regexp for comparison.
Also it matches one letter parameters almost always (i.e. “e” for “MarketPlace”).
I would like to propose changing they way around it to only process qs parameters in request.
This can reduce CPU lifecycles on the worker.
reqURL.searchParams.forEach((value: string, key: string) => { let res = PROMO_QUERY_PARAMETERS.indexOf(key) !== -1; if(res) { reqURL.searchParams.delete(key); } });
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Worker template incorrect regexp’ is closed to new replies.