I just noticed that we copy around UserScript [1] object which contains vector of UserScript::File and such.
This is a metabug to clean up and improve some of these scenarios.
How big of a win this is, isn't totally clear to me yet. But we should avoid these kind of obvious suboptimal stuffs regardless.
[1] https://cs.chromium.org/chromium/src/extensions/common/user_script.h
Comment 1 by bugdroid1@chromium.org
, Jun 22 2016