Skip to content
Snippets Groups Projects
Commit 99fb378c authored by Russell Bryant's avatar Russell Bryant
Browse files

Change the traversal to use ao2_callback() instead of an ao2_iterator. Using

ao2_callback() is a much more efficient way of performing an operation on every
item in the container.  This change makes hashtest2 run in about 25% of the
time it ran before on my system.

In general, I would say that it makes the most sense to use an ao2_iterator if
the operation being performed is going to take a long time and you don't want
to keep the container locked while you work with each object.  Otherwise,
the use of ao2_callback is preferred.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 7e19df05
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment