Hi
A question here is 35-43 references are ALL references or only the references of the level 0?
When you publish a record with two levels, you are not only creating or recreating one record but also rebuilding all the linked records in two levels, in multiple languages.
Level 0 -> resolve the original record and its direct relation in the current diffusion table.
Level 1 -> All level0 plus the direct relations and its own relations in its own tables.
Level 2 -> all level 1 plus the 2 relations of the level 1 with its own relation in its tables.
You need to read the diffusion documentation here
So, to diffuse a record with 35 direct relations, and each of these 35 relations should have another 35 relations in a deep level (two levels). The process should then process this structure.
leve0 x level 1 x level 2
35 x 35 x 35 = 42875 records (this is not true value, it could be more or less depending of your data and the section that you are making public )
If your publication schema has 2 languages,
42875 x 2 = 85.750 records
If the registers are large, as you mentioned, they use 2GB of RAM, which means you're removing or adding hundreds of MB so, your records are not «light» records, but, this is not the point.
So, this is NOT a single record. You are publishing thousands of records.
And 2 minutes for 85.750 records is equivalent to 700 records per second, or 0.0015 seconds (1.5 milliseconds) per record. I believe this is not slow...
When you say "2 levels," you mean that Dédalo should delve deeply into the direct relationships and then explore the second-level relationships within those.
Finally. If you know better approach for the diffusion process, please make a PR in GitHub or GitLab. We are working right now in the new diffusion engine for v7 to improve it, any help is welcome.
Best