Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24521

eZXMLTextType::deleteStoredObjectAttribute performance improvement

    XMLWordPrintable

Details

    Description

      Please optimize the eZXMLTextType::deleteStoredObjectAttribute function. That function features the following query:

      SELECT DISTINCT id
      FROM ezurl LEFT JOIN ezurl_object_link ON (ezurl.id  = ezurl_object_link.url_id)
      WHERE url_id IS NULL
      

      This query is executed for every ezxmltype attribute for every version of the objects:

      eZContentObject::purge:
      
      ...
      foreach ( $contentobjectAttributes as $contentobjectAttribute )
      {
      	$dataType = $contentobjectAttribute->dataType();
      	if ( !$dataType )
      		continue;
      	$dataType->deleteStoredObjectAttribute( $contentobjectAttribute );
      }
      $attrOffset += $attrLimit;
      ...
      

      This should be optimized, to prevent timeouts derived from deleting just a few contents.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: