[PATCH 2 of 2] hgweb: optimize process_dates function

Matt Mackall mpm at selenic.com
Mon Aug 19 14:11:14 CDT 2013


On Sat, 2013-08-10 at 14:56 +0200, Laurens Holst wrote:
> Op 08-08-13 15:16, Alexander Plavin schreef:
> > # HG changeset patch
> > # User Alexander Plavin <alexander at plav.in>
> > # Date 1374682432 -14400
> > #      Wed Jul 24 20:13:52 2013 +0400
> > # Node ID 2e3064b1a8b3719bc896e61a5804fd515a0bc9cb
> > # Parent  d2e91a2d576deff3bb97fefc1fe71c2a64d64bb6
> > 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+.
> 
> How much do we care about compatibility with IE8?

A lot. Here's a site that suggests it's the most popular version of IE
still:

http://www.w3schools.com/browsers/browsers_explorer.asp

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list