Ticket 452: metrics speedup by total overhaul