It's not teh size of the XML file that matters, its the number of nodes in the list whose max or min you are finding.
Other ways of finding min/max are
(a) sort and take the lowest/highest
(b) a recursive scan of the list, passing the highest-so-far or lowest-so-far as a parameter on the recursive call
(c) in XSLT 2.0, the min() or max() functions
(d) reuse the min() or max() functions/templates from the EXSLT or FXSL libraries
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference