view .jshintrc @ 50942:75d3306fbc9a stable

tags: avoid expensive access to repo.changelog in a loop repo.changelog needs some cache invalidation when run on filtered repository. Accessing it in that loop can be expensive when there is many heads (e.g. mozilla try and it 25 000 heads). Note that the loop itself seems useless, but after this patch it no longer take about ⅛ of the time we spend computing cache for mozilla try. before : ! wall 0.350994 comb 0.350000 user 0.330000 sys 0.020000 (median of 28) after : ! wall 0.319520 comb 0.310000 user 0.290000 sys 0.020000 (median of 30)
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 21 Jun 2023 21:57:44 +0200
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)
}