##// END OF EJS Templates
annotate: optimize line counting...
annotate: optimize line counting We used len(text.splitlines()) to count lines. This allocates, copies, and deallocates an object for every line in a file. Instead, we use count("\n") to count newlines and adjust based on whether there's a trailing newline. This improves the speed of annotating localrepo.py from 4.2 to 4.0 seconds.
Matt Mackall -
r29223:c04ad3d3 default
Show More
Name Size Modified Last Commit Author
/ mercurial / templates / spartan
branches.tmpl Loading ...
changelog.tmpl Loading ...
changelogentry.tmpl Loading ...
changeset.tmpl Loading ...
error.tmpl Loading ...
fileannotate.tmpl Loading ...
filediff.tmpl Loading ...
filelog.tmpl Loading ...
filelogentry.tmpl Loading ...
filerevision.tmpl Loading ...
footer.tmpl Loading ...
graph.tmpl Loading ...
header.tmpl Loading ...
index.tmpl Loading ...
manifest.tmpl Loading ...
map Loading ...
notfound.tmpl Loading ...
search.tmpl Loading ...
shortlog.tmpl Loading ...
shortlogentry.tmpl Loading ...
tags.tmpl Loading ...