view .jshintrc @ 40642:9c3c697267db

sparse-revlog: rework the way we enforce chunk size limit We move from a O(N) algorithm to a O(log(N)) algorithm. The previous algorithm was traversing the whole delta chain, looking for the exact point where it became too big. This would result in most of the delta chain to be traversed. Instead, we now use a "binary" approach, slicing the chain in two until we have a chunk of the appropriate size. We still keep the previous algorithm for the snapshots part. There are few of them and they are large bits of data distant from each other. So the previous algorithm should work well in that case. To take a practical example of restoring manifest revision '59547c40bc4c' for a reference NetBeans repository (using sparse-revlog). The media time of the step `slice-sparse-chain` of `perfrevlogrevision` improve from 1.109 ms to 0.660 ms.
author Boris Feld <boris.feld@octobus.net>
date Fri, 09 Nov 2018 17:58:37 +0100
parents bdd2e18b54c5
children
line wrap: on
line source

{
    // Enforcing
    "eqeqeq"        : true,     // true: Require triple equals (===) for comparison
    "forin"         : true,     // true: Require filtering for..in loops with obj.hasOwnProperty()
    "freeze"        : true,     // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
    "nonbsp"        : true,     // true: Prohibit "non-breaking whitespace" characters.
    "undef"         : true,     // true: Require all non-global variables to be declared (prevents global leaks)

    // Environments
    "browser"       : true      // Web Browser (window, document, etc)
}