chromium/octane

Code-Load replacement value gets cached

GoogleCodeExporter opened this issue · 3 comments

The bug:
In Code-Load's `cacheBust` function the `replacement` value repeats every so 
often so JS engines hit their cache/optimizations:
https://code.google.com/p/octane-benchmark/source/browse/trunk/code-load.js#1491

To address, you can add `+ seed;` to `replacement += ((salt + i * 7) % 
36).toString(36)`
.. making it `replacement += ((salt + i * 7) % 36).toString(36) + seed;`

You'll notice once you fix the issue with `replacement` in `cacheBust` that 
browsers' scores drop a bit for code-load because they cant leverage their 
internal caches or other opts (it's busting the caches/opts better).

Original issue reported on code.google.com by paulir...@google.com on 22 Jun 2013 at 12:45

Thanks Paul - we'll have a look.

Original comment by octane.t...@gmail.com on 25 Jun 2013 at 12:28

  • Changed state: Accepted
Was this fixed in V2?

Original comment by diblidab...@gmail.com on 18 Nov 2013 at 10:46

Yes, this is fixed with Octane 2.0 by using a true hashing function. Thanks for 
the report to Paul.

Original comment by mstarzinger@chromium.org on 18 Nov 2013 at 12:45

  • Changed state: Fixed