Andy_Herrman_22
Jul 16, 2007Nimbostratus
Local var performance
Quick performance question. I'm looking back at the iRules I worked on a year ago for our F5 evaluation and noticed something odd. At the top of the iRule the URI and Host values are stored in variables, but later on the iRule looks up the values again.
For example:
when HTTP_REQUEST {
set fulluri [HTTP::uri]
set host [HTTP::host]
if { [HTTP::uri] starts_with "/servletPath" } {
set hcid [findstr [HTTP::uri] "?id=" 4 "&"]
}
}
Now, I vaguely remember this being done because I read that doing [HTTP::uri] was actually faster than doing the variable lookup, but this seems odd to me. Is there any truth to that, or should I change it to just use the variables I declared (and maybe submit my original code to the daily WTF)?