The Matte Objects are rendered into a Depth Map.
So no, they are not “just loaded into memory”, they are actually rendered in a similar way to what Scanline renderer does, including evaluation of their material and taking into account its opacity mapping, so 100% Transparency from a texture produces a hole in the mesh that shows particles through it. Thus, the shader assigned to the Matte Object could also play a role in the slowdown.
A simple test I made:
1 Million Particles : 1.9 seconds to render.
1 Geosphere with no material, 800K faces (200 segs) as Matte: 11.418 seconds to render.
16 Geospheres, 50K faces, 800K faces total: 11.73 seconds to render.
16 Geospheres, 200K faces, 3200K faces total: 34.856 seconds.
16 Geospheres, 800K faces, 12.8M faces total: 132.53 seconds.
Seems to be scaling nearly linearly, as I would expect it to.
Using Magma would perform raytracing. With significant amounts of particles (1M+), this approach will be slower.
In fact, Krakatoa Mattes still support raytraced mattes internally when rendering with a Spherical lens camera override, because that cannot produce good depth map.
I switched the camera to Spherical and rendered 1MP against the 16 Geospheres with 50K faces each - got 23.398 seconds instead of 11.73s. The other two tests produced 67.158s and 290.12s.
As you can see, the raytracing was twice as slow with 1MP, and would get even slower with increasing particle count.
Also, raytracing does not allow for anti-aliasing, while the Supersampling of the Depth Map can find partially occluded particles.
If Motion Blur is enabled, the Depth Map will have to be regenerated on each pass, which obviously multiplies the times. If geometry is deforming, you have some ways to control how often it will be evaluated and given consistent topology, you could interpolate a bit, trading off time for lower quality results.
There are some things we can optimize in the future, but I think the times you saw were caused by a combination of settings that forced the reevaluation of the geometry many times.