Hacker News new | ask | show | jobs
by cyberroadie 5031 days ago
I made a varnish urlsort module a while ago: https://github.com/cyberroadie/varnish-urlsort

Here my blog post about it: http://cyberroadie.wordpress.com/2012/01/05/varnish-reorderi...

It parses the url and every token gets added to a binary tree which than gets traversed in order to get the parameters alphabetically

It's been used in production in several companies I worked for, so tried and tested :-)

Olivier

1 comments

Interesting. Do you have any benchmarks handy to show how much of a difference this makes? I'd wonder if the dynamic allocations necessary to build the tree might undercut the lookup advantages.