Mercurial > hg
comparison mercurial/registrar.py @ 38830:bfd5def3fe02
fileset: roughly adjust weights of functions
... in order to move status predicates far away from basic patterns. I don't
know if each weight is appropriate, but it should be good enough as a start.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 22 Jul 2018 11:47:29 +0900 |
parents | 7e7e2b2ff284 |
children | 61ab546b71c3 |
comparison
equal
deleted
inserted
replaced
38829:7e7e2b2ff284 | 38830:bfd5def3fe02 |
---|---|
248 default). | 248 default). |
249 | 249 |
250 Optional argument 'weight' indicates the estimated run-time cost, useful | 250 Optional argument 'weight' indicates the estimated run-time cost, useful |
251 for static optimization, default is 1. Higher weight means more expensive. | 251 for static optimization, default is 1. Higher weight means more expensive. |
252 | 252 |
253 ====== ============================================================= | |
254 Weight Description and examples | |
255 ====== ============================================================= | |
256 0.5 basic match patterns (e.g. a symbol) | |
257 10 computing status (e.g. added()) or accessing a few files | |
258 30 reading file content for each (e.g. grep()) | |
259 50 scanning working directory (ignored()) | |
260 ====== ============================================================= | |
261 | |
253 'filesetpredicate' instance in example above can be used to | 262 'filesetpredicate' instance in example above can be used to |
254 decorate multiple functions. | 263 decorate multiple functions. |
255 | 264 |
256 Decorated functions are registered automatically at loading | 265 Decorated functions are registered automatically at loading |
257 extension, if an instance named as 'filesetpredicate' is used for | 266 extension, if an instance named as 'filesetpredicate' is used for |