Just thought I'd share this one in case other folks run into the same
bottleneck I was. It might not be a situation that many people run into, but
it was frustrating enough for me that I thought I'd share the solution on
the off chance other people ran into it.
If you're generating *lots* of very similar directlinks, the cost associated
with building each link (about 1 ms per on my laptop) starts to add up.
When, you may ask, would one ever produce enough near-identical
direct links so that 1 ms per link would matter? In grids with a large
number of rows with leading "edit" links to allow you to pick a row off the
grid to edit.
To give a more concrete example, this particular block of code:
Was eating up 70% of the total time I spend rendering a 1,000 row
Fortunately, there is a pretty straightforward solution. Since all
1,000 rows have the exact same link but for the value of the "id" and "key"
parameters, we can just generate one url and then use a bit of string
manipulation for the other 999 entries.