Asset Builder Page - Processing Interupted Problem

I have made a new Asset Builder Page:
(Matrix v3.28.4)



Asset Types to Create: Product

Create Status: Under Construction

Metadata Schemas to Apply: None



It has one Dynamic Create Location Set, with about 6 locations (all folders).

The products created by this asset builder will inherit 2 metadata schemas.

None of the metadata fields are required.



But on creating a new product with this builder, there is an inordinate delay.

for example from the system log:

at [2011-01-19 09:16:44] it had created the new product and granted permissions

then nothing for this asset for 33 minutes, and then

at [2011-01-19 09:49:29] it "has sucessfully linked…" and it records all the attribute settings, and suceesfull upating lookups etc.



There is nothing in the error log during that period.



Can anyone suggest what might be going wrong… please?

Perhaps you could suggest some tests, or some experiments that I could try, to discover the cause.

Anyone?


Any Ideas?



Please suggest something that I could test, or try.



Anything.



Thanks, Polonius



System Log: (Now Running V4.0.2)

    
    [2011-01-31 11:40:50][asset - assetid:7964;] (Asset Created)- New product "Product #7964" created
    
    [2011-01-31 11:40:50][asset.permissions.grant -assetid:7964;] (Asset Permission Set) - Read permission has been granted onasset "Product #7964" for "Sam Poole"
    
    [2011-01-31 11:40:50][asset.permissions.grant -assetid:7964;] (Asset Permission Set) - Read permission has been granted onasset "Product #7964" for "Public User"
    
    [2011-01-31 11:40:50][asset.permissions.grant -assetid:7964;] (Asset Permission Set) - Write permission has been granted onasset "Product #7964" for "Sam Poole"
    
    [2011-01-31 11:40:50][asset.permissions.grant -assetid:7964;] (Asset Permission Set) - Admin permission has been granted onasset "Product #7964" for "Sam Poole"
    
    
    
    
    [2011-01-31 11:42:45][asset.linking.create -majorid:7868;minorid:7964;linkid:11884;] (Asset Link Created) - "Product#7964" was successfully linked to "Pianos"
    
    [2011-01-31 11:42:45][asset.lookups.updated - assetid:7964;](Asset Lookups Updated) - Asset "Product #7964" has successfullyupdated its lookups
    
    [2011-01-31 11:42:50][asset.attributes.fulllog.scalar -assetid:7964;] (Asset Attribute Changed) - The value of attribute"name" for asset "Product #7964" has been changed from"" to "Yellow Piano"
    
    [2011-01-31 11:42:50][asset.attributes.scalar -assetid:7964;] (Asset Attribute Changed) - The value of attribute"name" for asset "Product #7964" has been changed from"" to "Yellow Piano"
    
    [2011-01-31 11:42:50][asset.attributes.fulllog.scalar -assetid:7964;] (Asset Attribute Changed) - The value of attribute"short_name" for asset "Product #7964" has been changedfrom "" to "Yellow Piano"
    
    [2011-01-31 11:42:50][asset.attributes.scalar -assetid:7964;] (Asset Attribute Changed) - The value of attribute"short_name" for asset "Product #7964" has been changedfrom "" to "Yellow Piano"
    
    [2011-01-31 11:42:50][asset.metadata.schema.set.fulllog -assetid:7964;] (Asset Metadata Schema Applied) - The metadata schema"Default Metadata" was applied to asset "Product #7964"
    
    
    
    
    [2011-01-31 11:47:16][asset.metadata.schema.set.fulllog -assetid:7964;] (Asset Metadata Schema Applied) - The metadata schema"product_metadata" was applied to asset "Yellow Piano"

[quote]
Any Ideas?

[/quote]



No trigger running that could slow the process down?

Thank you Benjamin, for your suggestion.
But No, it isn't triggers.



The problem was caused by Contexts and multiple metadata schemas.

We have 11 language contexts set up in Matrix, and we had two metadata schemas for our products.



Here are the details:


  1. /packages/cms/page_templates/page_asset_builder/page_asset_builder.inc, "_processGlobalActions()", line 772, calls "setSchema()";
  2. /core/include/metadata_manager.inc, "setSchema()", line 331, calls "generateContentFile()";
  3. /core/include/metadata_manager.inc, "generateContentFile()", line 1344, calls "string_to_file()";
  4. /fudge/general/file_system.inc, "string_to_file()", line 100-144, makes and saves files called "matadata.php" and "metadata_field_values.php"


  5. /core/include/asset.inc, "cloneComponents()", line 2126, also calls "setSchema()";
  6. /core/include/metadata_manager.inc, "regenerateMetadata(), line 1839 also calls generateContentFile();



    The end result on our system was that "string_to_file()" was being called 33 times to make and overwrite the file pairs.



    The math is something like this:



    item 6. (above) runs and creates 11 pairs of files.

    then item 2. runs twice, once for each metadata schema, creating another 22 pairs of files.

    Why 11 pairs?. because we have 11 language contexts.



    With 33 files to make and save, it's little wonder that it all took minutes to do.



    And the irony is that all we wanted to do was to create a new asset, ready to have content added in the editor.

    All of the metadata files created are essentially "empty".



    Our remedy?
  7. We have merged the Metadata schemas, so there is only one.
  8. A temporary Hack, so that "generateContentFile()" is called only for the English Language Context.



    But that's only temporary, because eventually we will have to resurect the metadata for the other contexts.



    regards

    Polonius