What is pkg add doing before it says "Updating registry"?

When I ] add SomePackage it waits a few seconds and then says “Updating registry at”…

What is it doing during those seconds?