Fri, 06 Sep 2013 13:30:58 +0400 hgweb: optimize process_dates function
Alexander Plavin <alexander@plav.in> [Fri, 06 Sep 2013 13:30:58 +0400] rev 19857
hgweb: optimize process_dates function This function looped over every node due to getElementsByTagName('*'), instead of using selectors. In this patch we use querySelectorAll('.age') and process only these nodes, which is much faster and also doesn't require extra condition. Browser compatibility isn't sacrificed: IE 8+, FF 3.5+, Opera 10+.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -1 +1 +10 +30 +100 +300 +1000 +3000 +10000 +30000 tip