[14:30:13] Krinkle: re: the 100 kB module size limit for localStorage. Maybe it should be increased to accommodate jQuery (144 kB). That's currently a localStorage cache miss on every page. [14:33:57] not just a localStorage cache miss. It gets serialized into a 144 kB string on every page load before MediaWiki decides not to store it because it's too long. [14:47:57] that's an unfortunate pattern in general (serializing modules that are too large every time they are loaded, only to compute their length) [14:56:21] maybe the size cutoff calculation should be done in PHP and then signaled to JS similar to how MediaWiki sets group = private etc. [15:31:12] ori: aye, yeah, I think it may actually be performing better overall in that it gets its own http request, browser cached, and with all optimsations in browsers for bytecode caching and (since a year or two) in Chrome also a kind of snapshot caching for what the script exports/defines in the global scope, that stuff works best with normal script tags. [15:31:44] Tim found that Firefox at least does bytecode caching even on localstorage evals in some cases (at least for inline scripts, haven't checked for new Function yet). [15:31:53] but Chrome doesn't at this time. [15:32:16] but yeah, the serialize cost, while deferred via rIC, is still something we should avoid indeed. [18:42:52] Krinkle / TimStarling : looks like Chrome will cache bytecode for evals only if it's used more than once: https://github.com/v8/v8/blob/030ff73acbb621a42605fdff83eada8179a47c3c/src/objects/compilation-cache-table.h#L124-L134 [18:48:15] so Chrome will in fact cache bytecode but you won't see it on the first page load with a warm localStorage [18:51:01] ori: oh nice, so they ended adding it after all (or perhaps didn't mention it in their blog posts). I wonder if that's specific to window.eval() or whether they also applies to dynamic scriptElement.textContent and `new Function()` eval kinds. [18:51:36] I'm guessing the snapshotting remains tied to the script URL logic at their network layer, but basic bytecode caching working is neat. I wonder if Wikipedia's use of that played a role in making Chrome add that. [19:13:16] this comment seems to imply that Function() gets cached: https://github.com/v8/v8/blob/030ff73acbb621a42605fdff83eada8179a47c3c/src/codegen/compiler.cc#L2834-L2838 [19:13:59] but probably best to attach a debugger and set a breakpoint on this code to verify [19:14:33] https://chromium.googlesource.com/chromium/src/+/HEAD/docs/mac/debugging.md [22:14:39] serializing and calculating length should be free after https://gerrit.wikimedia.org/r/c/mediawiki/core/+/945699 [22:17:11] the branch is getting quite long, I'm hoping for some code reviews soon [22:18:44] a new commtech project will start up soon, that's a deadline of sorts