How to optimize nodes and view layers created with motion tracking "set scene" I have not used Blender in a long time but am working at learning some video applications for the software. what I have done is taken a sample video with a fair amount of camera motion and am learning how to add a model into the video scene. for now I am just experimenting with a still model working at simply adding it to the video , getting a shadow and having it track with the camera motion.
I would be interested in being pointed to some good up to date tutorials.
I could muster up more than a few questions if there is someone who knows a lot about this feature, I am getting some confusing results and find the documentation does not really say that much about the feature.
I don't know if that is normal, the file I start with has the model, rigging and a sun. prior to adding in the motion tracking the render is one pass. the compositor started with just rendered layers and composite.
this is what it looked like after solving the camera tracking and setting the tracking scene.

I thought it was the two versions of rendered layers causing the two pass rendering but even if I remove the second rendered layers and second alpha over the result I get is the same even though I have removed the rendered layer node that has no shadow.

Blender seems to insist on rendering that layer with no shadow first then as far as I can tell that is just discarded in favor of the layer with the shadow and because rendering is  time consuming I would rather cut that time then leave it doubled.
any help is appreciated.
OK I figured out what is going on, the file started with one layer and when I used the camera motion tracking to set the background and tracking scene it created a new layer so Blender rendered both layers, the shadow catching plane was put in a background layer.

the simplified version on top does the same thing as the one with the extra layers , the camera tracking works all the same it just renders faster.