Fast SIP header search
nragon opened this issue · comments
Hi,
For fast header indexing on SIP message shouldn't we use, for instance, LinkedHashMap or simply HashMap, on ImmutableSipMessage?
I have a use case where I only want some headers depending on user input.
Thanks,
Nuno
Feel free to run some performance tests to see if it truly matters. Based on my own performance tests, this is fast enough but if you have a use case where you always would access less common headers, that has their index saved, you may experience a different result.
Currently, it is optimized for the commonly used and mandatory headers so remember, if you change to another solution to optimize for some other random header, overall, you may make the solution slower because the stack itself, need to get all of those mandatory headers.
So, change it, run performance tests using sipp or something and see if it matters.
Thanks :) Will do.